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 <harryhaaren@gmail.com>
main
Harry van Haaren 2018-03-04 02:13:52 +00:00
parent f34a44e775
commit bc8e55b036
3 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -1,3 +1,7 @@
version_hxx = vcs_tag(
input : 'version.hxx.in',
output : 'version.hxx')
luppp_src = files(
'audiobuffer.cxx',
'controllerupdater.cxx',

1
src/version.hxx.in Normal file
View File

@ -0,0 +1 @@
#define GIT_VERSION "@VCS_TAG@"