[tracker] build: Modify how we define the GSettings schemas



commit 03b742d34de648819ca4947416b499dddb3e318f
Author: Sam Thursfield <sam afuera me uk>
Date:   Wed May 1 11:58:48 2019 +0200

    build: Modify how we define the GSettings schemas
    
    These changes are needed so that the 'tracker-miners' project can make
    use of the 'tracker' settings schemas when build with the
    `tracker=subproject` option.  There should be no change to funtionality.
    
    This is related to https://gitlab.gnome.org/GNOME/tracker/issues/24

 data/meson.build                   | 14 +++++++++-----
 tests/functional-tests/meson.build |  2 +-
 2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 0f10dd6bd..032ce9886 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,14 +1,14 @@
-schemas = [
+tracker_gsettings_schemas = files([
   'org.freedesktop.Tracker.DB.gschema.xml',
   'org.freedesktop.Tracker.FTS.gschema.xml',
   'org.freedesktop.Tracker.gschema.xml',
   'org.freedesktop.Tracker.Store.gschema.xml'
-]
+])
 
-foreach schema : schemas
+foreach schema : tracker_gsettings_schemas
   schemas = configure_file(
     input: schema,
-    output: schema,
+    output: '@PLAINNAME@',
     copy: true,
     install: true,
     install_dir: gsettings_schema_dir)
@@ -28,9 +28,13 @@ tracker_store_settings_enums = custom_target('tracker-store-settings-enums',
     install: true,
     install_dir: gsettings_schema_dir)
 
-# for unit tests
+# Compile schemas locally so that the functional-tests can use them without
+# them being installed into /usr.
+#
 custom_target('compile-schemas',
   output: 'gschemas.compiled',
   command: [find_program('glib-compile-schemas'), meson.current_build_dir()],
   build_by_default: true,
   depends: tracker_store_settings_enums)
+
+tracker_uninstalled_gsettings_schema_dir = meson.current_build_dir()
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index d8d139166..eb8b5a5e0 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -37,7 +37,7 @@ dconf_profile_full_path = join_paths(meson.current_source_dir(), 'trackertest')
 
 test_env = environment()
 test_env.set('DCONF_PROFILE', dconf_profile_full_path)
-test_env.set('GSETTINGS_SCHEMA_DIR', join_paths(build_root, 'data'))
+test_env.set('GSETTINGS_SCHEMA_DIR', tracker_uninstalled_gsettings_schema_dir)
 
 test_env.set('TRACKER_DB_ONTOLOGIES_DIR', tracker_uninstalled_nepomuk_ontologies_dir)
 test_env.set('TRACKER_FUNCTIONAL_TEST_BUILD_DIR', build_root)


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