summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-03-11 09:16:18 +0100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-03-11 17:38:22 +0000
commitca34b0af70f2827d45e9b372118718400f698b3a (patch)
treecd33d4fd332cc287aceb075b895235323b61395c
parenta0be869bb9c8acbd1a53e57b298a1a3d2f533716 (diff)
downloadmeson-ca34b0af70f2827d45e9b372118718400f698b3a.tar.gz
Support relative paths in pkgconfig files
This is a regression introduced in meson 0.47. Fixes https://github.com/mesonbuild/meson/issues/4135
-rw-r--r--mesonbuild/dependencies/base.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 6d41ec597..3c105ab2c 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -684,7 +684,11 @@ class PkgConfigDependency(ExternalDependency):
raw_link_args = self._convert_mingw_paths(shlex.split(out_raw))
for arg in raw_link_args:
if arg.startswith('-L') and not arg.startswith(('-L-l', '-L-L')):
- prefix_libpaths.add(arg[2:])
+ path = arg[2:]
+ if not os.path.isabs(path):
+ # Resolve the path as a compiler in the build directory would
+ path = os.path.join(self.env.get_build_dir(), path)
+ prefix_libpaths.add(path)
system_libpaths = OrderedSet()
full_args = self._convert_mingw_paths(shlex.split(out))
for arg in full_args: