modules/gnome: add symbol_prefix kwarg to g-ir-scanner

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
pull/77/head
Igor Gnatenko 10 years ago
parent 92d32c45a7
commit 2db5f97402
  1. 10
      modules/gnome.py
  2. 1
      test cases/frameworks/7 gnome/gir/meson.build

@ -71,6 +71,16 @@ class GnomeModule:
scan_command += ['--cflags-begin']
scan_command += state.global_args['c']
scan_command += ['--cflags-end']
if kwargs.get('symbol_prefix'):
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]
if kwargs.get('identifier_prefix'):
identifier_prefix = kwargs.pop('identifier_prefix')
if not isinstance(identifier_prefix, str):
raise MesonException('Gir identifier prefix must be str')
scan_command += ['--identifier-prefix=%s' % identifier_prefix]
if isinstance(girtarget, build.Executable):
scan_command += ['--program', girtarget]
elif isinstance(girtarget, build.SharedLibrary):

@ -8,6 +8,7 @@ gnome.generate_gir(girexe,
sources : libsources,
nsversion : '1.0',
namespace : 'Meson',
symbol_prefix : 'meson_',
includes : ['GObject-2.0', 'Gio-2.0'],
install : true
)

Loading…
Cancel
Save