diff options
author | jpakkane <jpakkane@gmail.com> | 2015-06-14 00:11:08 +0300 |
---|---|---|
committer | jpakkane <jpakkane@gmail.com> | 2015-06-14 00:11:08 +0300 |
commit | 78eeade5fec3a549e0df2f68486320002af26e30 (patch) | |
tree | eb1744011dde71b96ef86afc84f9c77a690b0981 | |
parent | de941eb4f6eb9ac533d83d86a554fc22ead84242 (diff) | |
parent | acb78ce8e6ca8364043a343513c2e5213ba71099 (diff) | |
download | meson-78eeade5fec3a549e0df2f68486320002af26e30.zip meson-78eeade5fec3a549e0df2f68486320002af26e30.tar.gz meson-78eeade5fec3a549e0df2f68486320002af26e30.tar.bz2 |
Merge pull request #145 from MathieuDuponchelle/fix_library_introspection
Fix library introspection
-rw-r--r-- | modules/gnome.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/modules/gnome.py b/modules/gnome.py index bcbbeb6..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): @@ -118,13 +130,11 @@ class GnomeModule: elif isinstance(girtarget, build.SharedLibrary): scan_command += ["-L", os.path.join (state.environment.get_build_dir(), girtarget.subdir)] libname = girtarget.get_basename() - if girtarget.soversion: - libname += "-%s" % girtarget.soversion scan_command += ['--library', libname] scankwargs = {'output' : girfile, 'input' : libsources, 'command' : scan_command, - 'depends' : girtarget, + 'depends' : depends, } if kwargs.get('install'): scankwargs['install'] = kwargs['install'] |