summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-05-08 10:21:54 +0200
committerGitHub <noreply@github.com>2018-05-08 10:21:54 +0200
commit7e396476236e9ee6c2f719d579048d682cca46e2 (patch)
treec3f9ac98ace6f1f12975fd9998e3d05944f3b805 /platform
parentd7d20b70afa53ab3ddb7fc594fb37d5f0c4c5bc4 (diff)
parenta6b191e3e0bbc707777165ecac593f72857ff395 (diff)
Merge pull request #18665 from mhilbrunner/build-sdk
Windows detect.py: Detect missing WindowsSdkDir
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/detect.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 2ce55d98be..6d559520d7 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -193,7 +193,10 @@ def configure_msvc(env, manual_msvc_config):
env.AppendUnique(CCFLAGS=['/MT', '/Gd', '/GR', '/nologo'])
env.AppendUnique(CXXFLAGS=['/TP']) # assume all sources are C++
if manual_msvc_config: # should be automatic if SCons found it
- env.Append(CPPPATH=[os.getenv("WindowsSdkDir") + "/Include"])
+ if os.getenv("WindowsSdkDir") is not None:
+ env.Append(CPPPATH=[os.getenv("WindowsSdkDir") + "/Include"])
+ else:
+ print("Missing environment variable: WindowsSdkDir")
env.AppendUnique(CPPDEFINES = ['WINDOWS_ENABLED', 'OPENGL_ENABLED',
'RTAUDIO_ENABLED', 'WASAPI_ENABLED',
@@ -211,7 +214,10 @@ def configure_msvc(env, manual_msvc_config):
env.Append(LINKFLAGS=[p + env["LIBSUFFIX"] for p in LIBS])
if manual_msvc_config:
- env.Append(LIBPATH=[os.getenv("WindowsSdkDir") + "/Lib"])
+ if os.getenv("WindowsSdkDir") is not None:
+ env.Append(LIBPATH=[os.getenv("WindowsSdkDir") + "/Lib"])
+ else:
+ print("Missing environment variable: WindowsSdkDir")
## LTO