summaryrefslogtreecommitdiff
path: root/modules
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
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')
-rw-r--r--modules/SCsub2
-rw-r--r--modules/assimp/SCsub118
-rw-r--r--modules/bullet/SCsub2
-rw-r--r--modules/enet/SCsub2
-rw-r--r--modules/freetype/SCsub8
-rw-r--r--modules/gdnative/nativescript/SCsub1
-rw-r--r--modules/mono/build_scripts/mono_configure.py4
-rw-r--r--modules/opus/SCsub12
-rw-r--r--modules/regex/SCsub10
-rw-r--r--modules/svg/SCsub2
-rw-r--r--modules/theora/SCsub2
-rw-r--r--modules/upnp/SCsub4
-rw-r--r--modules/vhacd/SCsub21
-rw-r--r--modules/webm/libvpx/SCsub4
-rw-r--r--modules/websocket/SCsub2
15 files changed, 96 insertions, 98 deletions
diff --git a/modules/SCsub b/modules/SCsub
index 67f5893db4..36c2472c42 100644
--- a/modules/SCsub
+++ b/modules/SCsub
@@ -13,7 +13,7 @@ env.modules_sources = [
for x in env.module_list:
if (x in env.disabled_modules):
continue
- env_modules.Append(CPPFLAGS=["-DMODULE_" + x.upper() + "_ENABLED"])
+ env_modules.Append(CPPDEFINES=["MODULE_" + x.upper() + "_ENABLED"])
SConscript(x + "/SCsub")
if env.split_modules:
diff --git a/modules/assimp/SCsub b/modules/assimp/SCsub
index 0da7e432e2..8a77e4f803 100644
--- a/modules/assimp/SCsub
+++ b/modules/assimp/SCsub
@@ -17,60 +17,60 @@ env_assimp.Prepend(CPPPATH=['#thirdparty/zlib/'])
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/contrib/openddlparser/include'])
env_assimp.Prepend(CPPPATH=['#thirdparty/assimp/contrib/rapidjson/include'])
env_assimp.Prepend(CPPPATH=['.'])
-#env_assimp.Append(CPPFLAGS=['-DASSIMP_DOUBLE_PRECISION']) # TODO default to what godot is compiled with for future double support
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_BOOST_WORKAROUND'])
-env_assimp.Append(CPPFLAGS=['-DOPENDDLPARSER_BUILD'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_OWN_ZLIB'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_EXPORT'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_X_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_AMF_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_3DS_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_MD3_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_MD5_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_MDL_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_MD2_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_PLY_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_ASE_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_OBJ_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_HMP_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_SMD_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_MDC_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_MD5_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_STL_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_LWO_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_DXF_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_NFF_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_RAW_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_SIB_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_OFF_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_AC_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_BVH_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_IRRMESH_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_IRR_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_Q3D_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_B3D_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_COLLADA_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_TERRAGEN_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_CSM_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_3D_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_LWS_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_OGRE_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_OPENGEX_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_MS3D_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_COB_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_BLEND_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_Q3BSP_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_NDO_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_STEP_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_IFC_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_XGL_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_ASSBIN_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_GLTF_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_C4D_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_3MF_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_NO_X3D_IMPORTER'])
+#env_assimp.Append(CPPDEFINES=['ASSIMP_DOUBLE_PRECISION']) # TODO default to what godot is compiled with for future double support
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_BOOST_WORKAROUND'])
+env_assimp.Append(CPPDEFINES=['OPENDDLPARSER_BUILD'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OWN_ZLIB'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_EXPORT'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_X_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_AMF_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_3DS_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD3_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD5_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MDL_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD2_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_PLY_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_ASE_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OBJ_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_HMP_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_SMD_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MDC_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MD5_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_STL_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_LWO_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_DXF_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_NFF_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_RAW_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_SIB_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OFF_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_AC_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_BVH_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_IRRMESH_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_IRR_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_Q3D_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_B3D_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_COLLADA_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_TERRAGEN_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_CSM_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_3D_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_LWS_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OGRE_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_OPENGEX_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_MS3D_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_COB_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_BLEND_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_Q3BSP_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_NDO_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_STEP_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_IFC_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_XGL_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_ASSBIN_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_GLTF_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_C4D_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_3MF_IMPORTER'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_NO_X3D_IMPORTER'])
-env_assimp.Append(CPPFLAGS=['-DASSIMP_BUILD_SINGLETHREADED'])
+env_assimp.Append(CPPDEFINES=['ASSIMP_BUILD_SINGLETHREADED'])
if (not env.msvc):
env_assimp.Append(CXXFLAGS=['-std=c++11'])
@@ -78,14 +78,14 @@ elif (env.msvc == False and env['platform'] == 'windows'):
env_assimp.Append(LDFLAGS=['-pthread'])
if(env['platform'] == 'windows'):
- env_assimp.Append(CPPFLAGS=['-DPLATFORM_WINDOWS'])
- env_assimp.Append(CPPFLAGS=['-DPLATFORM=WINDOWS'])
+ env_assimp.Append(CPPDEFINES=['PLATFORM_WINDOWS'])
+ env_assimp.Append(CPPDEFINES=[('PLATFORM', 'WINDOWS')])
elif(env['platform'] == 'x11'):
- env_assimp.Append(CPPFLAGS=['-DPLATFORM_LINUX'])
- env_assimp.Append(CPPFLAGS=['-DPLATFORM=LINUX'])
+ env_assimp.Append(CPPDEFINES=['PLATFORM_LINUX'])
+ env_assimp.Append(CPPDEFINES=[('PLATFORM', 'LINUX')])
elif(env['platform'] == 'osx'):
- env_assimp.Append(CPPFLAGS=['-DPLATFORM_DARWIN'])
- env_assimp.Append(CPPFLAGS=['-DPLATFORM=DARWIN'])
+ env_assimp.Append(CPPDEFINES=['PLATFORM_DARWIN'])
+ env_assimp.Append(CPPDEFINES=[('PLATFORM', 'DARWIN')])
env_thirdparty = env_assimp.Clone()
env_thirdparty.disable_warnings()
diff --git a/modules/bullet/SCsub b/modules/bullet/SCsub
index 2fe7a1b4c0..ecc8a9b481 100644
--- a/modules/bullet/SCsub
+++ b/modules/bullet/SCsub
@@ -192,7 +192,7 @@ if env['builtin_bullet']:
else:
env_bullet.Prepend(CPPPATH=[thirdparty_dir])
# if env['target'] == "debug" or env['target'] == "release_debug":
- # env_bullet.Append(CPPFLAGS=['-DBT_DEBUG'])
+ # env_bullet.Append(CPPDEFINES=['BT_DEBUG'])
env_thirdparty = env_bullet.Clone()
env_thirdparty.disable_warnings()
diff --git a/modules/enet/SCsub b/modules/enet/SCsub
index 78d8d43414..485c33b1a8 100644
--- a/modules/enet/SCsub
+++ b/modules/enet/SCsub
@@ -22,7 +22,7 @@ if env['builtin_enet']:
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_enet.Prepend(CPPPATH=[thirdparty_dir])
- env_enet.Append(CPPFLAGS=["-DGODOT_ENET"])
+ env_enet.Append(CPPDEFINES=["GODOT_ENET"])
env_thirdparty = env_enet.Clone()
env_thirdparty.disable_warnings()
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'])
diff --git a/modules/gdnative/nativescript/SCsub b/modules/gdnative/nativescript/SCsub
index 5841ad5531..92c9d6630d 100644
--- a/modules/gdnative/nativescript/SCsub
+++ b/modules/gdnative/nativescript/SCsub
@@ -4,7 +4,6 @@ Import('env')
Import('env_gdnative')
env_gdnative.add_source_files(env.modules_sources, '*.cpp')
-env_gdnative.Append(CPPFLAGS=['-DGDAPI_BUILT_IN'])
if "platform" in env and env["platform"] in ["x11", "iphone"]:
env.Append(LINKFLAGS=["-rdynamic"])
diff --git a/modules/mono/build_scripts/mono_configure.py b/modules/mono/build_scripts/mono_configure.py
index c549640d61..733cdd168c 100644
--- a/modules/mono/build_scripts/mono_configure.py
+++ b/modules/mono/build_scripts/mono_configure.py
@@ -173,7 +173,7 @@ def configure(env, env_mono):
if not mono_lib:
raise RuntimeError('Could not find mono library in: ' + mono_lib_path)
- env_mono.Append(CPPFLAGS=['-D_REENTRANT'])
+ env_mono.Append(CPPDEFINES=['_REENTRANT'])
if mono_static:
mono_lib_file = os.path.join(mono_lib_path, 'lib' + mono_lib + '.a')
@@ -398,7 +398,7 @@ def configure_for_mono_version(env, mono_version):
raise RuntimeError("Mono JIT compiler version not found; specify one manually with the 'MONO_VERSION' environment variable")
print('Found Mono JIT compiler version: ' + str(mono_version))
if mono_version >= LooseVersion('5.12.0'):
- env.Append(CPPFLAGS=['-DHAS_PENDING_EXCEPTIONS'])
+ env.Append(CPPDEFINES=['HAS_PENDING_EXCEPTIONS'])
def pkgconfig_try_find_mono_root(mono_lib_names, sharedlib_ext):
diff --git a/modules/opus/SCsub b/modules/opus/SCsub
index a4a431bab7..1db5b0987e 100644
--- a/modules/opus/SCsub
+++ b/modules/opus/SCsub
@@ -139,7 +139,7 @@ if env['builtin_opus']:
opus_sources_silk = []
if env["platform"] in ["android", "iphone", "javascript"]:
- env_opus.Append(CPPFLAGS=["-DFIXED_POINT"])
+ env_opus.Append(CPPDEFINES=["FIXED_POINT"])
opus_sources_silk = [
"silk/fixed/LTP_analysis_filter_FIX.c",
"silk/fixed/LTP_scale_ctrl_FIX.c",
@@ -208,7 +208,7 @@ if env['builtin_opus']:
if env['builtin_libogg']:
env_opus.Prepend(CPPPATH=["#thirdparty/libogg"])
- env_opus.Append(CPPFLAGS=["-DHAVE_CONFIG_H"])
+ env_opus.Append(CPPDEFINES=["HAVE_CONFIG_H"])
thirdparty_include_paths = [
"",
@@ -222,14 +222,14 @@ if env['builtin_opus']:
if env["platform"] == "android":
if ("android_arch" in env and env["android_arch"] == "armv7"):
- env_opus.Append(CPPFLAGS=["-DOPUS_ARM_OPT"])
+ env_opus.Append(CPPDEFINES=["OPUS_ARM_OPT"])
elif ("android_arch" in env and env["android_arch"] == "arm64v8"):
- env_opus.Append(CPPFLAGS=["-DOPUS_ARM64_OPT"])
+ env_opus.Append(CPPDEFINES=["OPUS_ARM64_OPT"])
elif env["platform"] == "iphone":
if ("arch" in env and env["arch"] == "arm"):
- env_opus.Append(CPPFLAGS=["-DOPUS_ARM_OPT"])
+ env_opus.Append(CPPDEFINES=["OPUS_ARM_OPT"])
elif ("arch" in env and env["arch"] == "arm64"):
- env_opus.Append(CPPFLAGS=["-DOPUS_ARM64_OPT"])
+ env_opus.Append(CPPDEFINES=["OPUS_ARM64_OPT"])
env_thirdparty = env_opus.Clone()
env_thirdparty.disable_warnings()
diff --git a/modules/regex/SCsub b/modules/regex/SCsub
index 65f354ffa7..acbe4a5a01 100644
--- a/modules/regex/SCsub
+++ b/modules/regex/SCsub
@@ -9,10 +9,10 @@ if env['builtin_pcre2']:
jit_blacklist = ['javascript', 'uwp']
thirdparty_dir = '#thirdparty/pcre2/src/'
- thirdparty_flags = ['-DPCRE2_STATIC', '-DHAVE_CONFIG_H']
+ thirdparty_flags = ['PCRE2_STATIC', 'HAVE_CONFIG_H']
if 'platform' in env and env['platform'] not in jit_blacklist:
- thirdparty_flags.append('-DSUPPORT_JIT')
+ thirdparty_flags.append('SUPPORT_JIT')
thirdparty_sources = [
"pcre2_auto_possess.c",
@@ -47,17 +47,17 @@ if env['builtin_pcre2']:
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_regex.Prepend(CPPPATH=[thirdparty_dir])
- env_regex.Append(CPPFLAGS=thirdparty_flags)
+ env_regex.Append(CPPDEFINES=thirdparty_flags)
def pcre2_builtin(width):
env_pcre2 = env_regex.Clone()
env_pcre2.disable_warnings()
env_pcre2["OBJSUFFIX"] = "_" + width + env_pcre2["OBJSUFFIX"]
env_pcre2.add_source_files(env.modules_sources, thirdparty_sources)
- env_pcre2.Append(CPPFLAGS=["-DPCRE2_CODE_UNIT_WIDTH=" + width])
+ env_pcre2.Append(CPPDEFINES=[("PCRE2_CODE_UNIT_WIDTH", width)])
pcre2_builtin("16")
pcre2_builtin("32")
-env_regex.Append(CPPFLAGS=["-DPCRE2_CODE_UNIT_WIDTH=0"])
+env_regex.Append(CPPDEFINES=[("PCRE2_CODE_UNIT_WIDTH", 0)])
env_regex.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/svg/SCsub b/modules/svg/SCsub
index 90bfe22abb..9324c1634b 100644
--- a/modules/svg/SCsub
+++ b/modules/svg/SCsub
@@ -16,7 +16,7 @@ env_svg.Prepend(CPPPATH=[thirdparty_dir])
# FIXME: Needed in editor/editor_themes.cpp for now, but ideally there
# shouldn't be a dependency on modules/ and its own 3rd party deps.
env.Prepend(CPPPATH=[thirdparty_dir])
-env.Append(CPPFLAGS=["-DSVG_ENABLED"])
+env.Append(CPPDEFINES=["SVG_ENABLED"])
env_thirdparty = env_svg.Clone()
env_thirdparty.disable_warnings()
diff --git a/modules/theora/SCsub b/modules/theora/SCsub
index 785eca4c41..ff65d2f8ec 100644
--- a/modules/theora/SCsub
+++ b/modules/theora/SCsub
@@ -66,7 +66,7 @@ if env['builtin_libtheora']:
thirdparty_sources += thirdparty_sources_x86_vc
if (env["x86_libtheora_opt_gcc"] or env["x86_libtheora_opt_vc"]):
- env_theora.Append(CPPFLAGS=["-DOC_X86_ASM"])
+ env_theora.Append(CPPDEFINES=["OC_X86_ASM"])
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
diff --git a/modules/upnp/SCsub b/modules/upnp/SCsub
index ec1d7f44d5..3f56a69594 100644
--- a/modules/upnp/SCsub
+++ b/modules/upnp/SCsub
@@ -26,8 +26,8 @@ if env['builtin_miniupnpc']:
thirdparty_sources = [thirdparty_dir + "miniupnpc/" + file for file in thirdparty_sources]
env_upnp.Prepend(CPPPATH=[thirdparty_dir])
- env_upnp.Append(CPPFLAGS=["-DMINIUPNP_STATICLIB"])
- env_upnp.Append(CPPFLAGS=["-DMINIUPNPC_SET_SOCKET_TIMEOUT"])
+ env_upnp.Append(CPPDEFINES=["MINIUPNP_STATICLIB"])
+ env_upnp.Append(CPPDEFINES=["MINIUPNPC_SET_SOCKET_TIMEOUT"])
env_thirdparty = env_upnp.Clone()
env_thirdparty.disable_warnings()
diff --git a/modules/vhacd/SCsub b/modules/vhacd/SCsub
index 161aed2eb9..e581fb7bb2 100644
--- a/modules/vhacd/SCsub
+++ b/modules/vhacd/SCsub
@@ -10,22 +10,21 @@ env_vhacd = env_modules.Clone()
thirdparty_dir = "#thirdparty/vhacd/"
thirdparty_sources = [
-"src/vhacdManifoldMesh.cpp",
-"src/FloatMath.cpp",
-"src/vhacdMesh.cpp",
-"src/vhacdICHull.cpp",
-"src/vhacdVolume.cpp",
-"src/VHACD-ASYNC.cpp",
-"src/btAlignedAllocator.cpp",
-"src/vhacdRaycastMesh.cpp",
-"src/VHACD.cpp",
-"src/btConvexHullComputer.cpp"
+ "src/vhacdManifoldMesh.cpp",
+ "src/FloatMath.cpp",
+ "src/vhacdMesh.cpp",
+ "src/vhacdICHull.cpp",
+ "src/vhacdVolume.cpp",
+ "src/VHACD-ASYNC.cpp",
+ "src/btAlignedAllocator.cpp",
+ "src/vhacdRaycastMesh.cpp",
+ "src/VHACD.cpp",
+ "src/btConvexHullComputer.cpp"
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_vhacd.Prepend(CPPPATH=[thirdparty_dir + "/inc"])
-env_vhacd.Append(CPPFLAGS=["-DGODOT_ENET"])
# upstream uses c++11
if not env.msvc:
diff --git a/modules/webm/libvpx/SCsub b/modules/webm/libvpx/SCsub
index c76585013c..14fa6c1268 100644
--- a/modules/webm/libvpx/SCsub
+++ b/modules/webm/libvpx/SCsub
@@ -323,7 +323,7 @@ if webm_cpu_x86:
elif cpu_bits == '64':
env_libvpx["ASCPU"] = 'X86_64'
- env_libvpx.Append(CPPFLAGS=['-DWEBM_X86ASM'])
+ env_libvpx.Append(CPPDEFINES=['WEBM_X86ASM'])
webm_simd_optimizations = True
@@ -337,7 +337,7 @@ if webm_cpu_arm:
env_libvpx["ASFLAGS"] = ''
env_libvpx["ASCOM"] = '$AS $ASFLAGS -o $TARGET $SOURCES'
- env_libvpx.Append(CPPFLAGS=['-DWEBM_ARMASM'])
+ env_libvpx.Append(CPPDEFINES=['WEBM_ARMASM'])
webm_simd_optimizations = True
diff --git a/modules/websocket/SCsub b/modules/websocket/SCsub
index d9e60eb6f1..be26b08a60 100644
--- a/modules/websocket/SCsub
+++ b/modules/websocket/SCsub
@@ -84,7 +84,7 @@ if env['builtin_libwebsockets'] and not env["platform"] == "javascript": # alrea
env_lws.Prepend(CPPPATH=[thirdparty_dir + helper_dir])
if env["platform"] == "uwp":
- env_lws.Append(CPPFLAGS=["/DLWS_MINGW_SUPPORT"])
+ env_lws.Append(CPPDEFINES=["LWS_MINGW_SUPPORT"])
env_thirdparty = env_lws.Clone()
env_thirdparty.disable_warnings()