diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-05-07 00:42:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-07 00:42:12 +0200 |
commit | a6b191e3e0bbc707777165ecac593f72857ff395 (patch) | |
tree | 08fea5de11215e3038a23c1b524c7306eca3af21 /platform/windows | |
parent | baa39339681d1a3dd60a41f58c363a1fce176073 (diff) |
Windows detect.py: Detect missing WindowsSdkDir
Diffstat (limited to 'platform/windows')
-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 |