You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable (automatically prepends -D for GCC/Clang and /D for MSVC). We still use CPPFLAGS for some pre-processor flags which are not defines.
This commit is contained in:
@@ -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')})
|
||||
|
||||
Reference in New Issue
Block a user