Use get_default_include_dirs to detect BOOST_ROOT
This removes the need to specify BOOST_ROOT for cross-compilers.
This commit is contained in:
parent
a3e655d20d
commit
7b36897ff9
|
@ -82,9 +82,6 @@ class BoostDependency(ExternalDependency):
|
||||||
if 'BOOST_LIBRARYDIR' in os.environ:
|
if 'BOOST_LIBRARYDIR' in os.environ:
|
||||||
self.libdir = os.environ['BOOST_LIBRARYDIR']
|
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 self.boost_root is None:
|
||||||
if mesonlib.is_windows():
|
if mesonlib.is_windows():
|
||||||
self.boost_roots = self.detect_win_roots()
|
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)
|
mlog.log('Dependency Boost (%s) found:' % module_str, mlog.green('YES'), info)
|
||||||
|
|
||||||
def detect_nix_roots(self):
|
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):
|
def detect_win_roots(self):
|
||||||
res = []
|
res = []
|
||||||
|
|
Loading…
Reference in New Issue