From 2d54c15c301e020b84a9f12d062a5ff84fcc16ce Mon Sep 17 00:00:00 2001 From: Richy HBM Date: Sun, 30 Jul 2017 13:22:30 +0100 Subject: [PATCH] Add compiler flags for windows This adds MSVC compiler flags to enable the DEBUG/NDEBUG defines, enable exceptions, turn on optimizations for Release builds, and link to the correct runtime library --- SConstruct | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SConstruct b/SConstruct index 286bfd29..9c204f2e 100644 --- a/SConstruct +++ b/SConstruct @@ -40,6 +40,10 @@ if platform == "linux": env.Append(CPPPATH=['.', godot_headers_path, 'include', 'include/core']) if platform == "windows": + if target == "debug": + env.Append(CCFLAGS = ['-EHsc', '-D_DEBUG', '/MDd']) + else: + env.Append(CCFLAGS = ['-O2', '-EHsc', '-DNDEBUG', '/MD']) env.Append(LIBS=[godot_name]) env.Append(LIBPATH=[godot_lib_path])