diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-05-08 10:21:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-08 10:21:54 +0200 |
commit | 7e396476236e9ee6c2f719d579048d682cca46e2 (patch) | |
tree | c3f9ac98ace6f1f12975fd9998e3d05944f3b805 /platform | |
parent | d7d20b70afa53ab3ddb7fc594fb37d5f0c4c5bc4 (diff) | |
parent | a6b191e3e0bbc707777165ecac593f72857ff395 (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.py | 10 |
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 |