mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03: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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user