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
Max Audron 2 years ago committed by Nedko Arnaudov
parent 709a032a93
commit a19489541c

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