gnome: Link against dependencies when building the gir files

pull/329/head
Thibault Saunier 9 years ago
parent 0585a959d3
commit c2e163e655
  1. 2
      dependencies.py
  2. 9
      modules/gnome.py

@ -71,6 +71,7 @@ class PkgConfigDependency(Dependency):
def __init__(self, name, environment, kwargs):
Dependency.__init__(self)
self.is_libtool = False
self.required = kwargs.get('required', True)
if 'native' in kwargs and environment.is_cross_build():
want_cross = not kwargs['native']
@ -150,6 +151,7 @@ class PkgConfigDependency(Dependency):
'but we could not compute the actual shared'
'library path' % lib)
lib = shared_lib
self.is_libtool = True
self.libs.append(lib)

@ -168,6 +168,15 @@ class GnomeModule:
girdir = dep.held_object.get_variable ("girdir")
if girdir:
scan_command += ["--add-include-path=%s" % girdir]
for lib in dep.held_object.libs:
if os.path.isabs(lib) and dep.held_object.is_libtool:
scan_command += ["-L%s" % os.path.dirname(lib)]
libname = os.path.basename(lib)
if libname.startswith("lib"):
libname = libname[3:]
libname = libname.split(".so")[0]
lib = "-l%s" % libname
scan_command += [lib]
inc_dirs = None
if kwargs.get('include_directories'):

Loading…
Cancel
Save