Fix macports builds: don't override include paths unless BOOST_ROOT.

We don't want to add /usr/local to the include path, because that will
pick up homebrew headers.
pull/2824/head
Benjamin Redelings 7 years ago
parent 075e2d4154
commit ce0b0d463f
  1. 11
      mesonbuild/dependencies/misc.py

@ -143,7 +143,7 @@ class BoostDependency(ExternalDependency):
else:
self.incdir = self.detect_nix_incdir()
if self.incdir is None:
if self.incdir is None and mesonlib.is_windows():
self.log_fail()
return
@ -152,7 +152,7 @@ class BoostDependency(ExternalDependency):
# previous versions of meson allowed include dirs as modules
remove = []
for m in invalid_modules:
if m in os.listdir(os.path.join(self.incdir, 'boost')):
if self.incdir and m in os.listdir(os.path.join(self.incdir, 'boost')):
mlog.warning('Requested boost library', mlog.bold(m), 'that doesn\'t exist. '
'This will be an error in the future')
remove.append(m)
@ -178,6 +178,7 @@ class BoostDependency(ExternalDependency):
else:
self.log_fail()
def log_fail(self):
module_str = ', '.join(self.requested_modules)
mlog.log("Dependency Boost (%s) found:" % module_str, mlog.red('NO'))
@ -212,10 +213,8 @@ class BoostDependency(ExternalDependency):
return res
def detect_nix_incdir(self):
for root in self.boost_roots:
incdir = os.path.join(root, 'include', 'boost')
if os.path.isdir(incdir):
return os.path.join(root, 'include')
if self.boost_root:
return os.path.join(self.boost_root, 'include')
return None
# FIXME: Should pick a version that matches the requested version

Loading…
Cancel
Save