diff --git a/platform/windows/detect.py b/platform/windows/detect.py index ffadaf0f7f2..0430e5f77e8 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -167,7 +167,10 @@ def configure(env): env.Append(CCFLAGS=['/MT', '/Gd', '/GR', '/nologo']) env.Append(CXXFLAGS=['/TP']) env.Append(CPPFLAGS=['/DMSVC', '/GR', ]) - env.Append(CCFLAGS=['/I' + os.getenv("WindowsSdkDir") + "/Include"]) + if os.getenv("WindowsSdkDir") is not None: + env.Append(CCFLAGS=['/I' + os.getenv("WindowsSdkDir") + "/Include"]) + else: + print("Missing environment variable: WindowsSdkDir") env.Append(CCFLAGS=['/DWINDOWS_ENABLED']) env.Append(CCFLAGS=['/DOPENGL_ENABLED']) @@ -182,7 +185,10 @@ def configure(env): LIBS = ['winmm', 'opengl32', 'dsound', 'kernel32', 'ole32', 'oleaut32', 'user32', 'gdi32', 'IPHLPAPI', 'Shlwapi', 'wsock32', 'Ws2_32', 'shell32', 'advapi32', 'dinput8', 'dxguid', 'imm32'] env.Append(LINKFLAGS=[p + env["LIBSUFFIX"] for p in LIBS]) - 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") if (os.getenv("VCINSTALLDIR")): VC_PATH = os.getenv("VCINSTALLDIR")