diff options
| author | Corentin Noël <corentin.noel@collabora.com> | 2025-02-20 22:12:10 +0100 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-03-01 13:37:09 +0200 |
| commit | b7b45bb161529382cb0fcfbccec0fc6fe0d51a12 (patch) | |
| tree | 200e9d9bcb8533ba04f7c9465767ce378d9a0e1c /mesonbuild/modules/gnome.py | |
| parent | f0795e14c55dfbad2291136090ee964cce2c38ed (diff) | |
| download | meson-b7b45bb161529382cb0fcfbccec0fc6fe0d51a12.tar.gz | |
modules/gnome: Allow to specify the doc-format argument
Add the support for the doc-format argument if g-ir-scanner supports it.
Ignore the argument otherwise as this is a no-op in such cases.
Diffstat (limited to 'mesonbuild/modules/gnome.py')
| -rw-r--r-- | mesonbuild/modules/gnome.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 8bde6e091..dffc61574 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -82,6 +82,7 @@ if T.TYPE_CHECKING: build_by_default: bool dependencies: T.List[Dependency] + doc_format: T.Optional[str] export_packages: T.List[str] extra_args: T.List[str] fatal_warnings: bool @@ -1103,6 +1104,7 @@ class GnomeModule(ExtensionModule): _EXTRA_ARGS_KW, ENV_KW.evolve(since='1.2.0'), KwargInfo('dependencies', ContainerTypeInfo(list, Dependency), default=[], listify=True), + KwargInfo('doc_format', (str, NoneType), since='1.8.0'), KwargInfo('export_packages', ContainerTypeInfo(list, str), default=[], listify=True), KwargInfo('fatal_warnings', bool, default=False, since='0.55.0'), KwargInfo('header', ContainerTypeInfo(list, str), default=[], listify=True), @@ -1208,6 +1210,9 @@ class GnomeModule(ExtensionModule): scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_source_dir(), state.root_subdir)] scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_build_dir(), state.root_subdir)] + if kwargs['doc_format'] is not None and self._gir_has_option('--doc-format'): + scan_command += ['--doc-format', kwargs['doc_format']] + if '--warn-error' in scan_command: FeatureDeprecated.single_use('gnome.generate_gir argument --warn-error', '0.55.0', state.subproject, 'Use "fatal_warnings" keyword argument', state.current_node) |
