gnome: g-ir-scanner accepts multiple symbol-prefix arguments

pull/2449/head
Rico Tzschichholz 7 years ago committed by Jussi Pakkanen
parent 68bd64cd38
commit 8b8e1ee620
  1. 3
      docs/markdown/Gnome-module.md
  2. 6
      mesonbuild/modules/gnome.py

@ -72,7 +72,8 @@ tool so see its documentation for more information.
* `install_dir_typelib`: (*Added 0.35.0*) which directory to install
the typelib file into
* `link_with`: list of libraries to link with
* `symbol_prefix`: the symbol prefix for the gir object, e.g. `gtk`
* `symbol_prefix`: the symbol prefix for the gir object, e.g. `gtk`,
(*Since 0.43.0*) an ordered list of multiple prefixes is allowed
Returns an array of two elements which are: `[gir_target,
typelib_target]`

@ -511,10 +511,8 @@ class GnomeModule(ExtensionModule):
# does not understand -f LDFLAGS. https://bugzilla.gnome.org/show_bug.cgi?id=783892
# ldflags += compilers.sanitizer_link_args(sanitize)
if 'symbol_prefix' in kwargs:
sym_prefix = kwargs.pop('symbol_prefix')
if not isinstance(sym_prefix, str):
raise MesonException('Gir symbol prefix must be str')
scan_command += ['--symbol-prefix=%s' % sym_prefix]
sym_prefixes = mesonlib.stringlistify(kwargs.pop('symbol_prefix', []))
scan_command += ['--symbol-prefix=%s' % sym_prefix for sym_prefix in sym_prefixes]
if 'identifier_prefix' in kwargs:
identifier_prefix = kwargs.pop('identifier_prefix')
if not isinstance(identifier_prefix, str):

Loading…
Cancel
Save