From 6288763671692edbc953a2b80225e9a7c7fc87e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 5 Aug 2021 16:18:44 +0200 Subject: [PATCH] build: Stop using source_root()/build_root() They were deprecated in meson 0.56. Part-of: --- data/meson.build | 2 +- meson.build | 3 +++ src/meson.build | 2 +- src/tests/meson.build | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/data/meson.build b/data/meson.build index b1e81d1b5..b55ded908 100644 --- a/data/meson.build +++ b/data/meson.build @@ -7,7 +7,7 @@ custom_target('mutter.desktop', msgfmt, '--desktop', '--template', '@INPUT@', - '-d', join_paths(meson.source_root(), 'po'), + '-d', join_paths(mutter_srcdir, 'po'), '-o', '@OUTPUT@' ], install: true, diff --git a/meson.build b/meson.build index 6a269cdf9..7d44178f0 100644 --- a/meson.build +++ b/meson.build @@ -11,6 +11,9 @@ split_version = meson.project_version().split('.') api_version = split_version[0].to_int() - 32 libmutter_api_version = '@0@'.format(api_version) +mutter_srcdir = meson.current_source_dir() +mutter_builddir = meson.current_build_dir() + # generic version requirements fribidi_req = '>= 1.0.0' glib_req = '>= 2.69.0' diff --git a/src/meson.build b/src/meson.build index 8ea2df0fa..e306be472 100644 --- a/src/meson.build +++ b/src/meson.build @@ -824,7 +824,7 @@ if have_profiler if sysprof_dep.type_name() == 'pkgconfig' sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_pkgconfig_variable('datadir'), 'dbus-1', 'interfaces') else - sysprof_dbus_interfaces_dir = join_paths(meson.source_root(), 'subprojects', 'sysprof', 'src') + sysprof_dbus_interfaces_dir = join_paths(mutter_srcdir, 'subprojects', 'sysprof', 'src') endif sysprof3_dbus_file = join_paths(sysprof_dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml') diff --git a/src/tests/meson.build b/src/tests/meson.build index a809cef8a..9106a9a70 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -86,8 +86,8 @@ if have_installed_tests endif test_env = environment() -test_env.set('G_TEST_SRCDIR', join_paths(meson.source_root(), 'src')) -test_env.set('G_TEST_BUILDDIR', meson.build_root()) +test_env.set('G_TEST_SRCDIR', join_paths(mutter_srcdir, 'src')) +test_env.set('G_TEST_BUILDDIR', mutter_builddir) test_env.set('MUTTER_TEST_PLUGIN_PATH', '@0@'.format(default_plugin.full_path())) test_client = executable('mutter-test-client',