Fix wrong build options for MSVC

pull/1319/head
crashfort 2023-11-25 23:45:10 +01:00
parent 588d869a3b
commit d65aa2814b
1 changed files with 9 additions and 3 deletions

View File

@ -38,10 +38,16 @@ def generate(env):
env["CC"] = "clang-cl" env["CC"] = "clang-cl"
env["CXX"] = "clang-cl" env["CXX"] = "clang-cl"
if env["use_static_cpp"]: if env["optimize"] == "debug" or env["optimize"] == "none":
env.Append(CCFLAGS=["/MT"]) if env["use_static_cpp"]:
env.Append(CCFLAGS=["/MTd"])
else:
env.Append(CCFLAGS=["/MDd"])
else: else:
env.Append(CCFLAGS=["/MD"]) if env["use_static_cpp"]:
env.Append(CCFLAGS=["/MT"])
else:
env.Append(CCFLAGS=["/MD"])
elif sys.platform == "win32" or sys.platform == "msys": elif sys.platform == "win32" or sys.platform == "msys":
env["use_mingw"] = True env["use_mingw"] = True