From 7b36897ff9102b44f57359d0dd3ddc47ea19a052 Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Thu, 5 Oct 2017 23:16:11 +0200 Subject: [PATCH] Use get_default_include_dirs to detect BOOST_ROOT This removes the need to specify BOOST_ROOT for cross-compilers. --- mesonbuild/dependencies/misc.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index a0d5e47e9..e00897d7f 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -82,9 +82,6 @@ class BoostDependency(ExternalDependency): if 'BOOST_LIBRARYDIR' in os.environ: self.libdir = os.environ['BOOST_LIBRARYDIR'] - if self.want_cross and self.boost_root is None and self.incdir is None: - raise DependencyException('BOOST_ROOT or BOOST_INCLUDEDIR is needed while cross-compiling') - if self.boost_root is None: if mesonlib.is_windows(): self.boost_roots = self.detect_win_roots() @@ -131,7 +128,8 @@ class BoostDependency(ExternalDependency): mlog.log('Dependency Boost (%s) found:' % module_str, mlog.green('YES'), info) def detect_nix_roots(self): - return ['/usr/local', '/usr'] + return [os.path.abspath(os.path.join(x, '..')) + for x in self.compiler.get_default_include_dirs()] def detect_win_roots(self): res = []