aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2020-10-28 22:23:16 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2020-11-13 17:39:47 +0200
commit21897a10ca0295f65f158ed3cbac396bc5adbb54 (patch)
treef57d4c6d65b8cd77c64c4bbaee940127929159b2 /mesonbuild/modules/gnome.py
parentd4cd0ceb9d4efcd0f376db3e10405a7160fd5c41 (diff)
downloadmeson-21897a10ca0295f65f158ed3cbac396bc5adbb54.zip
meson-21897a10ca0295f65f158ed3cbac396bc5adbb54.tar.gz
meson-21897a10ca0295f65f158ed3cbac396bc5adbb54.tar.bz2
gnome: Handle libraries that are not in the current build dir
The generate_gir() function previously assumed all library inputs were in the current build dir. This would fail if they weren't.
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r--mesonbuild/modules/gnome.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 2d32328..9fd31c7 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -554,15 +554,16 @@ class GnomeModule(ExtensionModule):
else:
# Because of https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/72
# we can't use the full path until this is merged.
+ libpath = os.path.join(girtarget.get_subdir(), girtarget.get_filename())
if isinstance(girtarget, build.SharedLibrary):
+ # need to put our output directory first as we need to use the
+ # generated libraries instead of any possibly installed system/prefix
+ # ones.
+ ret += ["-L@BUILD_ROOT@/{}".format(os.path.dirname(libpath))]
libname = girtarget.get_basename()
else:
- libname = os.path.join("@PRIVATE_OUTDIR_ABS_%s@" % girtarget.get_id(), girtarget.get_filename())
+ libname = os.path.join("@BUILD_ROOT@/{}".format(libpath))
ret += ['--library', libname]
- # need to put our output directory first as we need to use the
- # generated libraries instead of any possibly installed system/prefix
- # ones.
- ret += ["-L@PRIVATE_OUTDIR_ABS_%s@" % girtarget.get_id()]
# Needed for the following binutils bug:
# https://github.com/mesonbuild/meson/issues/1911
# However, g-ir-scanner does not understand -Wl,-rpath