diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-04-30 13:12:02 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-04-30 13:12:06 +0200 |
commit | d52b70fb5e8e842ddcc9a57bad8e34366c0ee6d8 (patch) | |
tree | a6c12125403b60a1620066e225061535fb362e4c /platform/windows/detect.py | |
parent | e949d6c2ae64a0faecd595b7589c1690426f18a7 (diff) |
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).
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r-- | platform/windows/detect.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 5c38eebf04..4b4b507499 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -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'])) |