diff options
author | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2015-03-31 20:32:00 +0300 |
---|---|---|
committer | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2015-03-31 20:45:32 +0300 |
commit | 9204cd49176eaff796274be863cb31a7b3959554 (patch) | |
tree | 90923b512251935a91378755e613a2d981c0780d /modules | |
parent | 9158c42839ba01d144844f4dcd1f633d0405843b (diff) | |
download | meson-9204cd49176eaff796274be863cb31a7b3959554.zip meson-9204cd49176eaff796274be863cb31a7b3959554.tar.gz meson-9204cd49176eaff796274be863cb31a7b3959554.tar.bz2 |
modules/gnome: add support for include dirs with GIRs
Closes #94
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gnome.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gnome.py b/modules/gnome.py index efa7655..afd07a0 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -89,6 +89,13 @@ class GnomeModule: scan_command += ['--pkg-export=%s' % pkg for pkg in pkgs] else: raise MesonException('Gir export packages must be str or list') + inc_dirs = None + if kwargs.get('include_directories'): + inc_dirs = kwargs.pop('include_directories') + if isinstance(inc_dirs.held_object, build.IncludeDirs): + scan_command += ['--add-include-path=%s' % inc for inc in inc_dirs.held_object.get_incdirs()] + else: + raise MesonException('Gir include dirs should be include_directories()') if isinstance(girtarget, build.Executable): scan_command += ['--program', girtarget] elif isinstance(girtarget, build.SharedLibrary): @@ -103,6 +110,8 @@ class GnomeModule: typelib_output = '%s-%s.typelib' % (ns, nsversion) typelib_cmd = ['g-ir-compiler', scan_target, '--output', '@OUTPUT@'] + if inc_dirs: + typelib_cmd += ['--includedir=%s' % inc for inc in inc_dirs.held_object.get_incdirs()] kwargs['output'] = typelib_output kwargs['command'] = typelib_cmd # Note that this can't be libdir, because e.g. on Debian it points to |