aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam C. Foltzer <acfoltzer@galois.com>2017-06-02 08:20:56 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2017-06-07 20:11:34 +0300
commita53e44ad638085c7b7a50a819f8615a1a8750d85 (patch)
tree8048096fa71c4115372a91127b2aded1e13740d2
parent7c03bfb46340995687354f478ad02d6751d80bd1 (diff)
downloadmeson-a53e44ad638085c7b7a50a819f8615a1a8750d85.zip
meson-a53e44ad638085c7b7a50a819f8615a1a8750d85.tar.gz
meson-a53e44ad638085c7b7a50a819f8615a1a8750d85.tar.bz2
generalize the system include detection a bit
This should help when using a non-standard sysroot, common in cross-compiling
-rw-r--r--mesonbuild/dependencies/misc.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index 35e840c..6a76ba6 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -124,8 +124,12 @@ class BoostDependency(Dependency):
# For now, use -isystem for all includes except for some
# typical defaults (which don't need to be included at all
- # since they are in the default include paths)
- if include_dir != '/usr/include' and include_dir != '/usr/local/include':
+ # since they are in the default include paths). These typical
+ # defaults include the usual directories at the root of the
+ # filesystem, but also any path that ends with those directory
+ # names in order to handle cases like cross-compiling where we
+ # might have a different sysroot.
+ if not include_dir.endswith(('/usr/include', '/usr/local/include')):
args.append("".join(self.cpp_compiler.get_include_args(include_dir, True)))
return args