diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2018-05-31 11:28:27 +1200 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-06-07 15:14:07 +0000 |
commit | 83665a482a13fa82989103989b544e30f1308795 (patch) | |
tree | c74696c4a851b7b656ae25caa3a61b76f9d2e62c | |
parent | 61c6f589f3b7b48434c7dba1adfb94f0e9eead4d (diff) | |
download | meson-83665a482a13fa82989103989b544e30f1308795.zip meson-83665a482a13fa82989103989b544e30f1308795.tar.gz meson-83665a482a13fa82989103989b544e30f1308795.tar.bz2 |
gdbus_codegen: Support arbitrary extra arguments
-rw-r--r-- | docs/markdown/Gnome-module.md | 1 | ||||
-rw-r--r-- | mesonbuild/modules/gnome.py | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/docs/markdown/Gnome-module.md b/docs/markdown/Gnome-module.md index 1bf333f..a02cc42 100644 --- a/docs/markdown/Gnome-module.md +++ b/docs/markdown/Gnome-module.md @@ -234,6 +234,7 @@ one XML file. * `sources`: list of XML files * `interface_prefix`: prefix for the interface * `namespace`: namespace of the interface +* `extra_args`: (*Added 0.47.0*) additional command line arguments to pass * `object_manager`: *(Added 0.40.0)* if true generates object manager code * `annotations`: *(Added 0.43.0)* list of lists of 3 strings for the annotation for `'ELEMENT', 'KEY', 'VALUE'` * `docbook`: *(Added 0.43.0)* prefix to generate `'PREFIX'-NAME.xml` docbooks diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 6db05ae..08298e8 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -881,7 +881,8 @@ This will become a hard error in the future.''') @FeatureNewKwargs('build target', '0.46.0', ['install_header', 'install_dir', 'sources']) @FeatureNewKwargs('build target', '0.40.0', ['build_by_default']) - @permittedKwargs({'interface_prefix', 'namespace', 'object_manager', 'build_by_default', + @FeatureNewKwargs('build target', '0.47.0', ['extra_args']) + @permittedKwargs({'interface_prefix', 'namespace', 'extra_args', 'object_manager', 'build_by_default', 'annotations', 'docbook', 'install_header', 'install_dir', 'sources'}) def gdbus_codegen(self, state, args, kwargs): if len(args) not in (1, 2): @@ -890,6 +891,8 @@ This will become a hard error in the future.''') xml_files = args[1:] target_name = namebase + '-gdbus' cmd = [self.interpreter.find_program_impl('gdbus-codegen')] + extra_args = mesonlib.stringlistify(kwargs.pop('extra_args', [])) + cmd += extra_args if 'interface_prefix' in kwargs: cmd += ['--interface-prefix', kwargs.pop('interface_prefix')] if 'namespace' in kwargs: |