diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2017-10-05 23:16:11 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-10-07 18:02:08 +0300 |
commit | 7b36897ff9102b44f57359d0dd3ddc47ea19a052 (patch) | |
tree | 502e7a77a66065fe96e8361beecd507a445f35ec | |
parent | a3e655d20d31090ad56d2423b16523a9dbc1c0e7 (diff) | |
download | meson-7b36897ff9102b44f57359d0dd3ddc47ea19a052.zip meson-7b36897ff9102b44f57359d0dd3ddc47ea19a052.tar.gz meson-7b36897ff9102b44f57359d0dd3ddc47ea19a052.tar.bz2 |
Use get_default_include_dirs to detect BOOST_ROOT
This removes the need to specify BOOST_ROOT for cross-compilers.
-rw-r--r-- | mesonbuild/dependencies/misc.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index a0d5e47..e00897d 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 = [] |