aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-06-06 19:19:06 +0300
committerGitHub <noreply@github.com>2019-06-06 19:19:06 +0300
commit09a722c4bd6bf3014190ecc4d91eee1110affd99 (patch)
treed90a1df01feb683efa47cb75b87e26ba3eef11c4 /mesonbuild/dependencies/base.py
parent27c5d9f16f535b2aacdf009744d4f99d59b9c81f (diff)
parent82e36a6bfe3c765e81438492bdff81e248f11c53 (diff)
downloadmeson-09a722c4bd6bf3014190ecc4d91eee1110affd99.zip
meson-09a722c4bd6bf3014190ecc4d91eee1110affd99.tar.gz
meson-09a722c4bd6bf3014190ecc4d91eee1110affd99.tar.bz2
Merge pull request #5263 from Ericson2314/per-machine-cli-args
Per machine 'build_' and '' options
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 21cd821..a6fb0b6 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -665,11 +665,15 @@ class PkgConfigDependency(ExternalDependency):
else:
env = env.copy()
- if self.want_cross:
- extra_paths = self.env.coredata.get_builtin_option('cross_pkg_config_path')
+ if not self.want_cross and self.env.is_cross_build():
+ for_machine = MachineChoice.BUILD
else:
- extra_paths = self.env.coredata.get_builtin_option('pkg_config_path')
- env['PKG_CONFIG_PATH'] = ':'.join([p for p in extra_paths])
+ for_machine = MachineChoice.HOST
+
+ extra_paths = self.env.coredata.builtins_per_machine[for_machine]['pkg_config_path'].value
+ new_pkg_config_path = ':'.join([p for p in extra_paths])
+ mlog.debug('PKG_CONFIG_PATH: ' + new_pkg_config_path)
+ env['PKG_CONFIG_PATH'] = new_pkg_config_path
fenv = frozenset(env.items())
targs = tuple(args)
cache = PkgConfigDependency.pkgbin_cache
@@ -1134,10 +1138,7 @@ class CMakeDependency(ExternalDependency):
if cm_path:
cm_args.append('-DCMAKE_MODULE_PATH=' + ';'.join(cm_path))
- if environment.is_cross_build() and self.want_cross:
- pref_path = self.env.coredata.builtins['cross_cmake_prefix_path'].value
- else:
- pref_path = self.env.coredata.builtins['cmake_prefix_path'].value
+ pref_path = self.env.coredata.builtins_per_machine[for_machine]['cmake_prefix_path'].value
if pref_path:
cm_args.append('-DCMAKE_PREFIX_PATH={}'.format(';'.join(pref_path)))