From b6971f2007c0b28f12da2594498f51dadc70c963 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Fri, 4 Nov 2016 01:35:29 +1100 Subject: 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. --- mesonbuild/modules/gnome.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'mesonbuild/modules/gnome.py') 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, -- cgit v1.1