mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-22 05:06:02 +00:00
scons: pass -isystem instead of -I for third party library includes
This commit is contained in:
parent
a5ba3273aa
commit
a48be105f7
@ -159,6 +159,8 @@ else:
|
|||||||
from cross_compile import *
|
from cross_compile import *
|
||||||
setup_cross_compile(env)
|
setup_cross_compile(env)
|
||||||
|
|
||||||
|
env.Tool("system_include")
|
||||||
|
|
||||||
if 'HOME' in os.environ:
|
if 'HOME' in os.environ:
|
||||||
env['ENV']['HOME'] = os.environ['HOME']
|
env['ENV']['HOME'] = os.environ['HOME']
|
||||||
|
|
||||||
|
20
scons/system_include.py
Normal file
20
scons/system_include.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
def exists():
|
||||||
|
return True
|
||||||
|
|
||||||
|
def make_incflags(paths, RDirs):
|
||||||
|
result = []
|
||||||
|
for path in paths:
|
||||||
|
if not str(path).startswith("#"):
|
||||||
|
for rdir in RDirs((path,)):
|
||||||
|
result.append("-isystem")
|
||||||
|
result.append(str(rdir))
|
||||||
|
else:
|
||||||
|
for rdir in RDirs((path,)):
|
||||||
|
result.append("-I" + str(rdir))
|
||||||
|
return result
|
||||||
|
|
||||||
|
def generate(env):
|
||||||
|
if "gcc" in env["TOOLS"]:
|
||||||
|
env["make_incflags"] = make_incflags
|
||||||
|
env["INCPREFIX"] = ""
|
||||||
|
env["_CPPINCFLAGS"] = "$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, lambda x : make_incflags(x, RDirs), TARGET, SOURCE)} $)"
|
Loading…
x
Reference in New Issue
Block a user