[mutter] build: Stop using source_root()/build_root()



commit 6288763671692edbc953a2b80225e9a7c7fc87e7
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Aug 5 16:18:44 2021 +0200

    build: Stop using source_root()/build_root()
    
    They were deprecated in meson 0.56.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1957>

 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 b1e81d1b5c..b55ded9089 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 6a269cdf92..7d44178f08 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 8ea2df0fa9..e306be4720 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 a809cef8a5..9106a9a70d 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',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]