You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
This commit is contained in:
@@ -201,7 +201,7 @@ def configure_msvc(env, manual_msvc_config):
|
||||
env.AppendUnique(CXXFLAGS=['/TP']) # assume all sources are C++
|
||||
if manual_msvc_config: # should be automatic if SCons found it
|
||||
if os.getenv("WindowsSdkDir") is not None:
|
||||
env.Append(CPPPATH=[os.getenv("WindowsSdkDir") + "/Include"])
|
||||
env.Prepend(CPPPATH=[os.getenv("WindowsSdkDir") + "/Include"])
|
||||
else:
|
||||
print("Missing environment variable: WindowsSdkDir")
|
||||
|
||||
@@ -239,7 +239,7 @@ def configure_msvc(env, manual_msvc_config):
|
||||
env.AppendUnique(LINKFLAGS=['/LTCG'])
|
||||
|
||||
if manual_msvc_config:
|
||||
env.Append(CPPPATH=[p for p in os.getenv("INCLUDE").split(";")])
|
||||
env.Prepend(CPPPATH=[p for p in os.getenv("INCLUDE").split(";")])
|
||||
env.Append(LIBPATH=[p for p in os.getenv("LIB").split(";")])
|
||||
|
||||
# Incremental linking fix
|
||||
@@ -342,7 +342,7 @@ def configure_mingw(env):
|
||||
|
||||
def configure(env):
|
||||
# At this point the env has been set up with basic tools/compilers.
|
||||
env.Append(CPPPATH=['#platform/windows'])
|
||||
env.Prepend(CPPPATH=['#platform/windows'])
|
||||
|
||||
print("Configuring for Windows: target=%s, bits=%s" % (env['target'], env['bits']))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user