summaryrefslogtreecommitdiff
path: root/platform/windows/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r--platform/windows/detect.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 4b4b507499..cc9ba720a8 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -274,7 +274,7 @@ def configure_mingw(env):
elif (env["target"] == "release_debug"):
env.Append(CCFLAGS=['-O2'])
- env.Append(CPPFLAGS=['-DDEBUG_ENABLED'])
+ env.Append(CPPDEFINES=['DEBUG_ENABLED'])
if (env["debug_symbols"] == "yes"):
env.Prepend(CCFLAGS=['-g1'])
if (env["debug_symbols"] == "full"):
@@ -286,7 +286,7 @@ def configure_mingw(env):
elif (env["target"] == "debug"):
env.Append(CCFLAGS=['-g3'])
- env.Append(CPPFLAGS=['-DDEBUG_ENABLED', '-DDEBUG_MEMORY_ENABLED'])
+ env.Append(CPPDEFINES=['DEBUG_ENABLED', 'DEBUG_MEMORY_ENABLED'])
## Compiler configuration
@@ -328,14 +328,11 @@ def configure_mingw(env):
## Compile flags
env.Append(CCFLAGS=['-mwindows'])
- env.Append(CPPFLAGS=['-DWINDOWS_ENABLED'])
- env.Append(CPPFLAGS=['-DOPENGL_ENABLED'])
- env.Append(CPPFLAGS=['-DWASAPI_ENABLED'])
- env.Append(CPPFLAGS=['-DWINMIDI_ENABLED'])
- env.Append(CPPFLAGS=['-DWINVER=%s' % env['target_win_version'], '-D_WIN32_WINNT=%s' % env['target_win_version']])
+ env.Append(CPPDEFINES=['WINDOWS_ENABLED', 'OPENGL_ENABLED', 'WASAPI_ENABLED', 'WINMIDI_ENABLED'])
+ env.Append(CPPDEFINES=[('WINVER', env['target_win_version']), ('_WIN32_WINNT', env['target_win_version'])])
env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid', 'ksuser', 'imm32', 'bcrypt', 'avrt', 'uuid'])
- env.Append(CPPFLAGS=['-DMINGW_ENABLED'])
+ env.Append(CPPDEFINES=['MINGW_ENABLED'])
# resrc
env.Append(BUILDERS={'RES': env.Builder(action=build_res_file, suffix='.o', src_suffix='.rc')})