summaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2020-01-14 11:11:52 +0100
committerXavier Claessens <xclaesse@gmail.com>2020-01-22 15:42:13 -0500
commit958df63dac810246e84c2b8eaa32d22d19ace0ef (patch)
tree3ca9044222feb643f62dabdf061992e70c68018a /mesonbuild/dependencies/base.py
parentc5c0c467fedb909c1cfe7547abe477fdabb5526c (diff)
downloadmeson-958df63dac810246e84c2b8eaa32d22d19ace0ef.tar.gz
envconfig: add pkg_config_libdir property
In order to unify the use of sysroot in the cross-file, the pkg_config_libdir can now be passed directly in the file.
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index d2d115e63..ca6b87463 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -697,6 +697,12 @@ class PkgConfigDependency(ExternalDependency):
mlog.debug('PKG_CONFIG_PATH: ' + new_pkg_config_path)
env['PKG_CONFIG_PATH'] = new_pkg_config_path
+ pkg_config_libdir_prop = self.env.properties[self.for_machine].get_pkg_config_libdir()
+ if pkg_config_libdir_prop:
+ new_pkg_config_libdir = ':'.join([p for p in pkg_config_libdir_prop])
+ env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir
+ mlog.debug('PKG_CONFIG_LIBDIR: ' + new_pkg_config_libdir)
+
fenv = frozenset(env.items())
targs = tuple(args)
cache = PkgConfigDependency.pkgbin_cache