From da349aaf58b4facaa3a1720e8c973c9bffb4c887 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 3 Sep 2022 13:37:46 +0100 Subject: 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 eefe2a3..b1f906b 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 b50e194..3a05ef1 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@"'.format(schemas_builddir), ] foreach tool: tools -- cgit v1.2.1 From 499c15d66a72a41523a379aadca559ae36150fa3 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 10 Sep 2022 18:30:06 +0100 Subject: build: Move shared variables in the top level build file We use the locations of the schemas directory in two places, so we might as well share the same variables everywhere. --- libgweather/tests/meson.build | 3 --- libgweather/tools/meson.build | 3 --- meson.build | 3 +++ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/libgweather/tests/meson.build b/libgweather/tests/meson.build index b1f906b..3574027 100644 --- a/libgweather/tests/meson.build +++ b/libgweather/tests/meson.build @@ -1,6 +1,3 @@ -schemas_srcdir = meson.project_source_root() / 'schemas' -schemas_builddir = meson.project_build_root() / 'schemas' - gweather_test_cargs = [ '-DSCHEMASDIR="@0@"'.format(schemas_srcdir), '-DSCHEMAS_BUILDDIR="@0@"'.format(schemas_builddir), diff --git a/libgweather/tools/meson.build b/libgweather/tools/meson.build index 3a05ef1..24f5f13 100644 --- a/libgweather/tools/meson.build +++ b/libgweather/tools/meson.build @@ -15,9 +15,6 @@ 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@"'.format(schemas_srcdir), diff --git a/meson.build b/meson.build index d8e9d7e..7569564 100644 --- a/meson.build +++ b/meson.build @@ -54,6 +54,9 @@ g_ir_scanner = find_program('g-ir-scanner', required: get_option('introspection' build_gir = get_option('introspection') and g_ir_scanner.found() and not meson.is_cross_build() build_docs = get_option('gtk_doc') and build_gir +schemas_srcdir = meson.project_source_root() / 'schemas' +schemas_builddir = meson.project_build_root() / 'schemas' + subdir('data') subdir('schemas') subdir('libgweather') -- cgit v1.2.1