meson: include build directory no matter it's name

when updating the ebuild i noticed that the include for the config.h and
version.h files relied on the build directory being name "build". This
is fixed now by using the last segment of the meson.build_root() output
which is the correct build dir.

also delete no longer needed manual creation of version.h and config.h
This commit is contained in:
Max Audron 2021-02-21 14:16:16 +01:00 committed by Nedko Arnaudov
parent 709a032a93
commit a19489541c
1 changed files with 1 additions and 3 deletions

View File

@ -9,8 +9,6 @@ dbus_base_path = '/org/ladish'
git_version = run_command(['git', 'rev-parse', '--short', 'HEAD']).stdout().strip()
run_command(['touch', 'build/version.h', 'build/config.h'])
configure_file(output : 'version.h',
configuration : {
'GIT_VERSION' : '"@0@"'.format(git_version)
@ -31,7 +29,7 @@ configure_file(output : 'config.h',
cc = meson.get_compiler('c')
inc = include_directories('build')
inc = include_directories(meson.build_root().split('/')[-1])
lash_inc = include_directories('lash_compat/liblash')
dbus_dep = dependency('dbus-1')