Implement pull/18665 for 3.0

Windows detect.py: Detect missing WindowsSdkDir
This commit is contained in:
Hein-Pieter van Braam 2018-05-13 22:32:01 +02:00
parent 9dc5ba1aaf
commit faceb5b75d

View file

@ -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")