summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2018-04-10 18:19:05 +0200
committerBenjamin Berg <bberg@redhat.com>2018-04-10 23:22:01 +0200
commitc5665d3e6547e21d57564abbbfcb01705e0a7744 (patch)
tree0094373e798d0f10bd9d0481d00213fec0e9a119 /data
parented1683470f532193726d11775b7d5b3f02e1991f (diff)
downloadgnome-settings-daemon-c5665d3e6547e21d57564abbbfcb01705e0a7744.tar.gz
data: Compile gschema files at build time and copy into tests
Without this we need to install the GSchema files for testing purposes.
Diffstat (limited to 'data')
-rw-r--r--data/meson.build16
1 files changed, 13 insertions, 3 deletions
diff --git a/data/meson.build b/data/meson.build
index 5c4fb507..e93ba641 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -15,19 +15,20 @@ schemas = [
schema_conf = configuration_data()
schema_conf.set('GETTEXT_PACKAGE', meson.project_name())
+schemas_xml = []
foreach schema: schemas
- configure_file(
+ schemas_xml += [configure_file(
input: schema + '.in',
output: schema,
configuration: schema_conf,
install: true,
install_dir: gsd_schemadir
- )
+ )]
endforeach
enums_header = files('gsd-enums.h')
-gnome.mkenums(
+mkenums = gnome.mkenums(
'org.gnome.settings-daemon.enums.xml',
sources: enums_header,
comments: '<!-- @comment@ -->',
@@ -57,3 +58,12 @@ pkg.generate(
filebase: meson.project_name(),
subdirs: gsd_api_name
)
+
+
+# for unit tests - gnome.compile_schemas() only looks in srcdir
+custom_target('compile-schemas',
+ input: schemas_xml,
+ depends: mkenums,
+ output: 'gschemas.compiled',
+ command: [find_program('glib-compile-schemas'), meson.current_build_dir()],
+ build_by_default: true)