From b0d41847ed1e4cd9407dce0d26aaa09db656ec12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 3 Jul 2019 09:16:20 +0200 Subject: 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. --- modules/freetype/SCsub | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/freetype') 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']) -- cgit v1.2.3