From bc8e55b036f068e33a607eac6bbbae53aec6d071 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Sun, 4 Mar 2018 02:13:52 +0000 Subject: [PATCH] meson: generate version.hxx on compile This fixes local builds (re-generates version.hxx if it gets removed), ninja dist now works correctly too. Signed-off-by: Harry van Haaren --- meson.build | 2 +- src/meson.build | 4 ++++ src/version.hxx.in | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 src/version.hxx.in diff --git a/meson.build b/meson.build index 230eaac..4fe900c 100644 --- a/meson.build +++ b/meson.build @@ -38,5 +38,5 @@ foreach dep : dep_names endforeach # compile the main project -executable('luppp', luppp_src, +executable('luppp', luppp_src + [version_hxx], dependencies: deps) diff --git a/src/meson.build b/src/meson.build index 7e02ce8..d350343 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,3 +1,7 @@ +version_hxx = vcs_tag( + input : 'version.hxx.in', + output : 'version.hxx') + luppp_src = files( 'audiobuffer.cxx', 'controllerupdater.cxx', diff --git a/src/version.hxx.in b/src/version.hxx.in new file mode 100644 index 0000000..9f82d90 --- /dev/null +++ b/src/version.hxx.in @@ -0,0 +1 @@ +#define GIT_VERSION "@VCS_TAG@"