modules/gnome: add support for multiple include for Gir. Closes #69

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
pull/72/head
Igor Gnatenko 10 years ago
parent 85132e8948
commit 3be7297de8
  1. 12
      modules/gnome.py
  2. 1
      test cases/frameworks/7 gnome/gir/meson.build

@ -58,8 +58,16 @@ class GnomeModule:
scan_name = girtarget.name + '-gir'
scan_command = ['g-ir-scanner', '@INPUT@', '--program', girtarget]
scan_command += pkgargs
scan_command += ['--include=GObject-2.0', '--namespace='+ns,
'--nsversion=' + nsversion, '--output', '@OUTPUT@']
scan_command += ['--namespace='+ns, '--nsversion=' + nsversion,
'--output', '@OUTPUT@']
if 'includes' in kwargs:
includes = kwargs.pop('includes')
if isinstance(includes, str):
scan_command += ['--include=%s' % includes]
elif isinstance(includes, list):
scan_command += ['--include=%s' % inc for inc in includes]
else:
raise MesonException('Gir includes must be str or list')
scankwargs = {'output' : girfile,
'input' : libsources,
'command' : scan_command}

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

Loading…
Cancel
Save