[libgweather/ebassi/deprecated-meson-roots] build: Remove deprecated Meson functions




commit fe57cd016ef9a59009fd64bf005f11a5b73290a9
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Sep 3 13:37:46 2022 +0100

    build: Remove deprecated Meson functions
    
    Use project_source_root() and project_build_root() instead of the
    deprecated source_root() and build_root(), respectively.

 libgweather/tests/meson.build | 7 +++++--
 libgweather/tools/meson.build | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/libgweather/tests/meson.build b/libgweather/tests/meson.build
index eefe2a3f..b1f906be 100644
--- a/libgweather/tests/meson.build
+++ b/libgweather/tests/meson.build
@@ -1,6 +1,9 @@
+schemas_srcdir = meson.project_source_root() / 'schemas'
+schemas_builddir = meson.project_build_root() / 'schemas'
+
 gweather_test_cargs = [
-  '-DSCHEMASDIR="@0@/schemas"'.format(meson.source_root()),
-  '-DSCHEMAS_BUILDDIR="@0@/schemas"'.format(meson.build_root()),
+  '-DSCHEMASDIR="@0@"'.format(schemas_srcdir),
+  '-DSCHEMAS_BUILDDIR="@0@"'.format(schemas_builddir),
 ]
 
 gweather_test_env = environment()
diff --git a/libgweather/tools/meson.build b/libgweather/tools/meson.build
index b50e194b..85d4f05a 100644
--- a/libgweather/tools/meson.build
+++ b/libgweather/tools/meson.build
@@ -15,10 +15,13 @@ tools = [
   }
 ]
 
+schemas_srcdir = meson.project_source_root() / 'schemas'
+schemas_builddir = meson.project_build_root() / 'schemas'
+
 tools_cargs = [
   '-DTEST_LOCATIONS="@0@"'.format(locations_bin.full_path()),
-  '-DSCHEMASDIR="@0@/schemas"'.format(meson.source_root()),
-  '-DSCHEMAS_BUILDDIR="@0@/schemas"'.format(meson.build_root()),
+  '-DSCHEMASDIR="@0@"'.format(schemas_srcdir),
+  '-DSCHEMAS_BUILDDIR="@0@/schemas"'.format(schemas_builddir),
 ]
 
 foreach tool: tools


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