diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-09-25 11:13:00 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-09-27 00:27:38 +0530 |
commit | c9a7422cc1389c1ec51df34d8f96b83aeaf8b509 (patch) | |
tree | 21f02d385488a75325cc0351bd56bc449ec4858e | |
parent | bcf20af62e4263c2841f8e1ea4f515d7fc6ec51a (diff) | |
download | meson-c9a7422cc1389c1ec51df34d8f96b83aeaf8b509.zip meson-c9a7422cc1389c1ec51df34d8f96b83aeaf8b509.tar.gz meson-c9a7422cc1389c1ec51df34d8f96b83aeaf8b509.tar.bz2 |
dependencies/boost: Require BOOST_ROOT while cross-compiling
Our fallback to the system-provided directories is never going to work
while cross-compiling
-rw-r--r-- | mesonbuild/dependencies.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index 106273c..f32e7ff 100644 --- a/mesonbuild/dependencies.py +++ b/mesonbuild/dependencies.py @@ -474,7 +474,12 @@ class BoostDependency(Dependency): def __init__(self, environment, kwargs): Dependency.__init__(self) self.name = 'boost' + self.environment = environment self.libdir = '' + if 'native' in kwargs and environment.is_cross_build(): + want_cross = not kwargs['native'] + else: + want_cross = environment.is_cross_build() try: self.boost_root = os.environ['BOOST_ROOT'] if not os.path.isabs(self.boost_root): @@ -482,6 +487,8 @@ class BoostDependency(Dependency): except KeyError: self.boost_root = None if self.boost_root is None: + if want_cross: + raise DependencyException('BOOST_ROOT is needed while cross-compiling') if mesonlib.is_windows(): self.boost_root = self.detect_win_root() self.incdir = self.boost_root |