summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Redelings <benjamin.redelings@gmail.com>2017-12-31 08:18:55 -0800
committerBenjamin Redelings <benjamin.redelings@gmail.com>2018-01-01 22:42:49 -0800
commitce0b0d463f2870aa5372cb51b7b898cbc649fc4f (patch)
tree70617eb7f7b2b2e3a96774cdd04bde7e7abda887
parent075e2d4154ffa2e416a84f68073e5e2da7784d7f (diff)
downloadmeson-ce0b0d463f2870aa5372cb51b7b898cbc649fc4f.tar.gz
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.
-rw-r--r--mesonbuild/dependencies/misc.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index 43412ddcb..3e2f78031 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/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