From 736c78d4c79f041faf33920bd0f82c29ecbe9586 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 29 Jul 2020 15:44:53 +0200 Subject: Version information via Meson --- libcrystfel/meson.build | 7 ++++++- libcrystfel/src/libcrystfel-version.c.in | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 libcrystfel/src/libcrystfel-version.c.in (limited to 'libcrystfel') diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build index a3d2e4f0..0a9d43ac 100644 --- a/libcrystfel/meson.build +++ b/libcrystfel/meson.build @@ -9,6 +9,11 @@ endif # FIXME: Curses, Xgandalf, pinkindexer, FDIP + +libcrystfel_versionc = vcs_tag(input: 'src/libcrystfel-version.c.in', + output: 'libcrystfel-version.c') + + libcrystfel_includes = include_directories('src') # Find forkpty() @@ -87,7 +92,7 @@ configure_file(input : 'config.h.in', libcrystfel_conf_inc = include_directories('.') -libcrystfel = library('crystfel', libcrystfel_sources, +libcrystfel = library('crystfel', [libcrystfel_sources, libcrystfel_versionc], include_directories : [libcrystfel_includes, libcrystfel_conf_inc], dependencies : [mdep, utildep, fftwdep, gsldep, zlibdep, hdf5dep, pthreaddep], diff --git a/libcrystfel/src/libcrystfel-version.c.in b/libcrystfel/src/libcrystfel-version.c.in new file mode 100644 index 00000000..f9dc4238 --- /dev/null +++ b/libcrystfel/src/libcrystfel-version.c.in @@ -0,0 +1,4 @@ +const char *libcrystfel_version_string() +{ + return "@VCS_TAG@"; +} -- cgit v1.2.3