diff options
author | Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> | 2015-06-13 20:13:11 +0200 |
---|---|---|
committer | Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> | 2015-06-13 20:14:47 +0200 |
commit | acb78ce8e6ca8364043a343513c2e5213ba71099 (patch) | |
tree | eb1744011dde71b96ef86afc84f9c77a690b0981 | |
parent | 048d31708544bc076da5e5b5b07db95c2fca9af7 (diff) | |
download | meson-acb78ce8e6ca8364043a343513c2e5213ba71099.zip meson-acb78ce8e6ca8364043a343513c2e5213ba71099.tar.gz meson-acb78ce8e6ca8364043a343513c2e5213ba71099.tar.bz2 |
gnome:generate_gir: Parse "link_with"
In case g-ir-scanner has to link with other dependencies.
-rw-r--r-- | modules/gnome.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/gnome.py b/modules/gnome.py index 179a3f2..7a0ef4b 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -55,6 +55,7 @@ class GnomeModule: nsversion = kwargs.pop('nsversion') libsources = kwargs.pop('sources') girfile = '%s-%s.gir' % (ns, nsversion) + depends = [girtarget] scan_command = ['g-ir-scanner', '@INPUT@'] scan_command += pkgargs @@ -65,6 +66,17 @@ class GnomeModule: for incdir in incdirs.get_incdirs(): scan_command += ['-I%s' % os.path.join(state.environment.get_source_dir(), incdir)] + if 'link_with' in kwargs: + link_with = kwargs.pop('link_with') + for link in link_with: + lib = link.held_object + scan_command += ['-l%s' % lib.name] + if isinstance(lib, build.SharedLibrary): + scan_command += ['-L%s' % + os.path.join(state.environment.get_build_dir(), + lib.subdir)] + depends.append(lib) + if 'includes' in kwargs: includes = kwargs.pop('includes') if isinstance(includes, str): @@ -122,7 +134,7 @@ class GnomeModule: scankwargs = {'output' : girfile, 'input' : libsources, 'command' : scan_command, - 'depends' : girtarget, + 'depends' : depends, } if kwargs.get('install'): scankwargs['install'] = kwargs['install'] |