gnome: Set GSETTINGS_SCHEMA_DIR in devenv

pull/8956/head
Xavier Claessens 4 years ago committed by Xavier Claessens
parent 0bef89b0c2
commit 39c6571a46
  1. 4
      docs/markdown/Commands.md
  2. 5
      docs/markdown/snippets/gnome.md
  3. 1
      mesonbuild/modules/gnome.py

@ -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 }}

@ -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.

@ -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'})

Loading…
Cancel
Save