scons: don't add redundant include path for /usr/include

This commit is contained in:
loonycyborg 2016-06-10 21:37:43 +03:00
parent 433a3ad7a4
commit 5a7b555d3a

View file

@ -1,6 +1,7 @@
# vi: syntax=python:et:ts=4
from config_check_utils import find_include
from os.path import join, dirname, basename
import sys, os.path
from glob import glob
import re
@ -69,10 +70,11 @@ def CheckBoost(context, boost_lib, require_version = None, header_only = False):
header_name = boost_headers.get(boost_lib, boost_lib + ".hpp")
libname = "boost_" + boost_lib + env.get("boost_suffix", "")
if env["fast"]:
env.AppendUnique(CXXFLAGS = ["-isystem", boostdir], LIBPATH = [boostlibdir])
else:
env.AppendUnique(CPPPATH = [boostdir], LIBPATH = [boostlibdir])
if sys.platform != "win32" and not os.path.samefile(boostdir, "/usr/include"):
if env["fast"]:
env.AppendUnique(CXXFLAGS = ["-isystem", boostdir], LIBPATH = [boostlibdir])
else:
env.AppendUnique(CPPPATH = [boostdir], LIBPATH = [boostlibdir])
if not header_only:
env.AppendUnique(LIBS = [libname])
if boost_lib == "thread" and env["PLATFORM"] == "posix":