aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-11-04 01:35:29 +1100
committerMatthew Waters <matthew@centricular.com>2016-11-04 01:35:29 +1100
commitb6971f2007c0b28f12da2594498f51dadc70c963 (patch)
tree47f0f80b024f53ad0e22ce8a5d1183bd678e9df8
parent314eb5110e14a71939f1535f4271461d9c439b50 (diff)
downloadmeson-b6971f2007c0b28f12da2594498f51dadc70c963.zip
meson-b6971f2007c0b28f12da2594498f51dadc70c963.tar.gz
meson-b6971f2007c0b28f12da2594498f51dadc70c963.tar.bz2
gnome: make generate_gir use the correct shared library
If building in a prefix with a version of the library that's already installed with other dependencies already installed in that prefix, then the installed library was being picked up to link with for gir generation instead of the newly built library.
-rw-r--r--mesonbuild/modules/gnome.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index b7d1438..e9a4a8a 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -385,7 +385,13 @@ class GnomeModule:
# spurious dependencies) but building GStreamer fails if they
# are not used here.
cflags, ldflags, gi_includes = self.get_dependencies_flags(deps, state, depends)
- scan_command += list(cflags) + list(ldflags)
+ scan_command += list(cflags)
+ # need to put our output directory first as we need to use the
+ # generated libraries instead of any possibly installed system/prefix
+ # ones.
+ if isinstance(girtarget, build.SharedLibrary):
+ scan_command += ["-L@PRIVATE_OUTDIR_ABS_%s@" % girtarget.get_id()]
+ scan_command += list(ldflags)
for i in gi_includes:
scan_command += ['--add-include-path=%s' % i]
@@ -403,7 +409,6 @@ class GnomeModule:
if isinstance(girtarget, build.Executable):
scan_command += ['--program', girtarget]
elif isinstance(girtarget, build.SharedLibrary):
- scan_command += ["-L@PRIVATE_OUTDIR_ABS_%s@" % girtarget.get_id()]
libname = girtarget.get_basename()
scan_command += ['--library', libname]
scankwargs = {'output' : girfile,