From f6a998070e6eef227f16777f4e26692c9a3547fd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 17 Feb 2022 11:27:09 +1000 Subject: meson.build: use current_source_dir() over deprecated source_root() The better equivalent would be project_source_root() but that's 0.56 and later only and in our case we don't have nested meson.build files anyway so current_source_dir() is always the top-level directory. Signed-off-by: Peter Hutterer --- meson.build | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 3c868ce..144d68c 100644 --- a/meson.build +++ b/meson.build @@ -7,9 +7,9 @@ project('libwacom', 'c', dir_bin = get_option('prefix') / get_option('bindir') dir_data = get_option('prefix') / get_option('datadir') / 'libwacom' dir_etc = get_option('prefix') / get_option('sysconfdir') / 'libwacom' -dir_src = meson.source_root() / 'libwacom' -dir_src_data= meson.source_root() / 'data' -dir_test = meson.source_root() / 'test' +dir_src = meson.current_source_dir() / 'libwacom' +dir_src_data= meson.current_source_dir() / 'data' +dir_test = meson.current_source_dir() / 'test' dir_sys_udev= get_option('prefix') / 'lib' / 'udev' dir_udev = get_option('udev-dir') @@ -120,7 +120,7 @@ install_subdir('data', test('files-in-git', find_program('test/check-files-in-git.sh'), - args: [meson.source_root()], + args: [meson.current_source_dir()], suite: ['all']) # This is a generic pytest invocation. If we end up with more than one @@ -128,7 +128,7 @@ test('files-in-git', pytest = find_program('pytest-3', required: false) if pytest.found() test('pytests', pytest, - workdir: meson.source_root(), + workdir: meson.current_source_dir(), env: ['LIBWACOM_DATA_DIR=@0@'.format(dir_src_data)]) endif @@ -209,7 +209,7 @@ if doxygen.found() doc_config = configuration_data() doc_config.set('PACKAGE_NAME', meson.project_name()) doc_config.set('PACKAGE_VERSION', meson.project_version()) - doc_config.set('TOPSRCDIR', meson.source_root()) + doc_config.set('TOPSRCDIR', meson.current_source_dir()) doxyfile = configure_file(input: 'doc/doxygen.conf.in', output: 'doxygen.conf', @@ -227,7 +227,7 @@ if get_option('tests').enabled() dep_libxml = dependency('libxml-2.0', required : false) dep_dl = cc.find_library('dl') - tests_cflags = ['-DTOPSRCDIR="@0@"'.format(meson.source_root())] + tests_cflags = ['-DTOPSRCDIR="@0@"'.format(meson.current_source_dir())] test_load = executable('test-load', 'test/test-load.c', @@ -289,8 +289,8 @@ if get_option('tests').enabled() pytest = find_program('pytest-3', 'pytest') test('pytest', pytest, - args: [meson.source_root()], - env: ['MESON_SOURCE_ROOT=@0@'.format(meson.source_root())], + args: [meson.current_source_dir()], + env: ['MESON_SOURCE_ROOT=@0@'.format(meson.current_source_dir())], suite: ['all']) endif -- cgit v1.2.1