From 43e2e88a4c422795f05b67e99f4eccb043e99c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20=22sp1rit=22=E2=80=8B?= Date: Tue, 9 Apr 2024 11:35:49 +0200 Subject: [PATCH] meson: Use gnome.compile_schemas() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This causes meson to automatically build the clapper gsettings schemas and set GSETTINGS_SCHEMA_DIR to the correct location within the devenv. This means that can now be ran without needing to install it somewhere using: meson devenv -C clapper exit More devenv overrides should be investigated (such as automatically adopting the correct directory for translated locales etc.) Signed-off-by: Florian "sp1rit"​ --- src/bin/clapper-app/data/glib-2.0/schemas/meson.build | 8 ++++++++ src/bin/clapper-app/data/meson.build | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 src/bin/clapper-app/data/glib-2.0/schemas/meson.build diff --git a/src/bin/clapper-app/data/glib-2.0/schemas/meson.build b/src/bin/clapper-app/data/glib-2.0/schemas/meson.build new file mode 100644 index 00000000..aec657f8 --- /dev/null +++ b/src/bin/clapper-app/data/glib-2.0/schemas/meson.build @@ -0,0 +1,8 @@ +gnome.compile_schemas( + build_by_default: true, + depend_files: ['com.github.rafostar.Clapper.gschema.xml'] +) + +install_data('com.github.rafostar.Clapper.gschema.xml', + install_dir: join_paths(prefix, datadir, 'glib-2.0', 'schemas') +) diff --git a/src/bin/clapper-app/data/meson.build b/src/bin/clapper-app/data/meson.build index 969d7cf0..b035a6a4 100644 --- a/src/bin/clapper-app/data/meson.build +++ b/src/bin/clapper-app/data/meson.build @@ -38,10 +38,8 @@ install_subdir('applications', install_subdir('metainfo', install_dir: join_paths(prefix, datadir) ) -install_subdir('glib-2.0', - install_dir: join_paths(prefix, datadir) -) +subdir('glib-2.0/schemas') subdir('dbus-1') gnome.post_install(