diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-06-23 13:39:55 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-06-23 15:48:32 -0400 |
commit | 39c6571a46e5d432f96d4a20946f7d4e5f72f9fd (patch) | |
tree | 1c6cb84bae231b7188b89eb2fa0e688cf57c4556 | |
parent | 0bef89b0c2cf49d70cbb41ab980a796044bd858c (diff) | |
download | meson-39c6571a46e5d432f96d4a20946f7d4e5f72f9fd.zip meson-39c6571a46e5d432f96d4a20946f7d4e5f72f9fd.tar.gz meson-39c6571a46e5d432f96d4a20946f7d4e5f72f9fd.tar.bz2 |
gnome: Set GSETTINGS_SCHEMA_DIR in devenv
-rw-r--r-- | docs/markdown/Commands.md | 4 | ||||
-rw-r--r-- | docs/markdown/snippets/gnome.md | 5 | ||||
-rw-r--r-- | mesonbuild/modules/gnome.py | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/docs/markdown/Commands.md b/docs/markdown/Commands.md index fc8cdd2..aa538b1 100644 --- a/docs/markdown/Commands.md +++ b/docs/markdown/Commands.md @@ -302,5 +302,9 @@ These variables are set in environment in addition to those set using `meson.add `PATH` on Windows. - `GI_TYPELIB_PATH` includes every directory where a GObject Introspection typelib is built. This is automatically set when using `gnome.generate_gir()`. +- `GSETTINGS_SCHEMA_DIR` *Since 0.59.0* includes every directory where a GSettings + schemas is compiled. This is automatically set when using `gnome.compile_schemas()`. + Note that this requires GLib >= 2.64 when `gnome.compile_schemas()` is used in + more than one directory. {{ devenv_arguments.inc }} diff --git a/docs/markdown/snippets/gnome.md b/docs/markdown/snippets/gnome.md new file mode 100644 index 0000000..1944376 --- /dev/null +++ b/docs/markdown/snippets/gnome.md @@ -0,0 +1,5 @@ +## `gnome.compile_schemas()` sets `GSETTINGS_SCHEMA_DIR` into devenv + +When using `gnome.compile_schemas()` the location of the compiled schema is +added to `GSETTINGS_SCHEMA_DIR` environment variable when using +[`meson devenv`](Commands.md#devenv) command. diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 51f2e6e..58fb31e 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -932,6 +932,7 @@ class GnomeModule(ExtensionModule): else: targetname = 'gsettings-compile-' + state.subdir.replace('/', '_') target_g = build.CustomTarget(targetname, state.subdir, state.subproject, kwargs) + self._devenv_append('GSETTINGS_SCHEMA_DIR', os.path.join(state.environment.get_build_dir(), state.subdir)) return ModuleReturnValue(target_g, [target_g]) @permittedKwargs({'sources', 'media', 'symlink_media', 'languages'}) |