diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2015-12-10 17:47:09 +0100 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2015-12-10 18:14:43 +0100 |
commit | c2e163e655e0307787bfb2cba6f9018de2583fcd (patch) | |
tree | fd8fb02c339b0b03f147c1d919a244a96309aaf1 | |
parent | 0585a959d3bc7e71c896d53ed4f9c74ba49f4825 (diff) | |
download | meson-c2e163e655e0307787bfb2cba6f9018de2583fcd.zip meson-c2e163e655e0307787bfb2cba6f9018de2583fcd.tar.gz meson-c2e163e655e0307787bfb2cba6f9018de2583fcd.tar.bz2 |
gnome: Link against dependencies when building the gir files
-rw-r--r-- | dependencies.py | 2 | ||||
-rw-r--r-- | modules/gnome.py | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/dependencies.py b/dependencies.py index 492fee0..87c1ba1 100644 --- a/dependencies.py +++ b/dependencies.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) diff --git a/modules/gnome.py b/modules/gnome.py index b7330d9..60c994e 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -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'): |