summaryrefslogtreecommitdiff
path: root/modules/freetype
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-07-03 09:16:20 +0200
committerRémi Verschelde <rverschelde@gmail.com>2019-07-03 09:59:04 +0200
commitb0d41847ed1e4cd9407dce0d26aaa09db656ec12 (patch)
tree8672de67513b1971abcb9c5fb5b0337ddcf67184 /modules/freetype
parentf5f7244a2b59de60b2c1c29346b2fe5ded2ae2d0 (diff)
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.
Diffstat (limited to 'modules/freetype')
-rw-r--r--modules/freetype/SCsub8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub
index 0ea581220e..b47377cbc4 100644
--- a/modules/freetype/SCsub
+++ b/modules/freetype/SCsub
@@ -65,16 +65,16 @@ if env['builtin_freetype']:
# Also needed in main env for scene/
env.Prepend(CPPPATH=[thirdparty_dir + "/include"])
- env_freetype.Append(CPPFLAGS=['-DFT2_BUILD_LIBRARY', '-DFT_CONFIG_OPTION_USE_PNG'])
+ env_freetype.Append(CPPDEFINES=['FT2_BUILD_LIBRARY', 'FT_CONFIG_OPTION_USE_PNG'])
if (env['target'] != 'release'):
- env_freetype.Append(CPPFLAGS=['-DZLIB_DEBUG'])
+ env_freetype.Append(CPPDEFINES=['ZLIB_DEBUG'])
# Also requires libpng headers
if env['builtin_libpng']:
env_freetype.Prepend(CPPPATH=["#thirdparty/libpng"])
sfnt = thirdparty_dir + 'src/sfnt/sfnt.c'
- # Must be done after all CPPFLAGS are being set so we can copy them.
+ # Must be done after all CPPDEFINES are being set so we can copy them.
if env['platform'] == 'javascript':
# Forcibly undefine this macro so SIMD is not used in this file,
# since currently unsupported in WASM
@@ -103,4 +103,4 @@ if env['builtin_freetype']:
# Godot source files
env_freetype.add_source_files(env.modules_sources, "*.cpp")
# Used in scene/, needs to be in main env
-env.Append(CPPFLAGS=['-DFREETYPE_ENABLED'])
+env.Append(CPPDEFINES=['FREETYPE_ENABLED'])