diff options
author | jpakkane <jpakkane@gmail.com> | 2015-03-24 01:51:01 +0200 |
---|---|---|
committer | jpakkane <jpakkane@gmail.com> | 2015-03-24 01:51:01 +0200 |
commit | 7d0c38257d28e66cd93cb563194a96fcb03458d1 (patch) | |
tree | e63aee295241ba3379028cd9676e4f27e4837499 | |
parent | d289887b1badb079835d0c9734e38150d35e3d15 (diff) | |
parent | 3be7297de8d6c72b36911e0108759d2b66df77f6 (diff) | |
download | meson-7d0c38257d28e66cd93cb563194a96fcb03458d1.zip meson-7d0c38257d28e66cd93cb563194a96fcb03458d1.tar.gz meson-7d0c38257d28e66cd93cb563194a96fcb03458d1.tar.bz2 |
Merge pull request #72 from ignatenkobrain/wip/gnome
modules/gnome: add support for multiple include for Gir. Closes #69
-rw-r--r-- | modules/gnome.py | 12 | ||||
-rw-r--r-- | test cases/frameworks/7 gnome/gir/meson.build | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/modules/gnome.py b/modules/gnome.py index 565f971..bfae555 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -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} diff --git a/test cases/frameworks/7 gnome/gir/meson.build b/test cases/frameworks/7 gnome/gir/meson.build index cb3308e..f4b118d 100644 --- a/test cases/frameworks/7 gnome/gir/meson.build +++ b/test cases/frameworks/7 gnome/gir/meson.build @@ -8,6 +8,7 @@ gnome.generate_gir(girexe, sources : libsources, nsversion : '1.0', namespace : 'Meson', +includes : ['GObject-2.0', 'Gio-2.0'], install : true ) |