diff options
author | Thomas White <taw@physics.org> | 2020-07-29 15:44:53 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:45 +0200 |
commit | 736c78d4c79f041faf33920bd0f82c29ecbe9586 (patch) | |
tree | 8fbf75c5cf5f2deb70d426b8c94eac78e46df968 /libcrystfel | |
parent | 42898f7d59e215434fa2aead84223f64b30fcee8 (diff) |
Version information via Meson
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/meson.build | 7 | ||||
-rw-r--r-- | libcrystfel/src/libcrystfel-version.c.in | 4 |
2 files changed, 10 insertions, 1 deletions
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@"; +} |