SCons: Ensure CPPDEFINES is properly utilized

This commit is contained in:
Thaddeus Crews
2025-07-14 12:10:21 -05:00
parent d5cb0f948e
commit 61956f2e06
9 changed files with 80 additions and 88 deletions

View File

@@ -395,24 +395,24 @@ if env["freetype_enabled"]:
)
if env["platform"] == "android" or env["platform"] == "linuxbsd":
env_harfbuzz.Append(CCFLAGS=["-DHAVE_PTHREAD"])
env_harfbuzz.Append(CPPDEFINES=["HAVE_PTHREAD"])
env_harfbuzz.Append(
CCFLAGS=[
"-DU_STATIC_IMPLEMENTATION",
"-DU_HAVE_LIB_SUFFIX=1",
"-DU_LIB_SUFFIX_C_NAME=_godot",
"-DHAVE_ICU_BUILTIN",
"-DHAVE_ICU",
CPPDEFINES=[
"U_STATIC_IMPLEMENTATION",
("U_HAVE_LIB_SUFFIX", 1),
("U_LIB_SUFFIX_C_NAME", "_godot"),
"HAVE_ICU_BUILTIN",
"HAVE_ICU",
]
)
if env["freetype_enabled"]:
env_harfbuzz.Append(
CCFLAGS=[
"-DHAVE_FREETYPE",
"-DHAVE_GRAPHITE2",
"-DGRAPHITE2_STATIC",
CPPDEFINES=[
"HAVE_FREETYPE",
"HAVE_GRAPHITE2",
"GRAPHITE2_STATIC",
]
)
@@ -471,10 +471,10 @@ if env["graphite_enabled"] and env["freetype_enabled"]:
env_graphite.Append(CPPPATH=["../../../thirdparty/graphite/src", "../../../thirdparty/graphite/include"])
env_graphite.Append(
CCFLAGS=[
"-DGRAPHITE2_STATIC",
"-DGRAPHITE2_NTRACING",
"-DGRAPHITE2_NFILEFACE",
CPPDEFINES=[
"GRAPHITE2_STATIC",
"GRAPHITE2_NTRACING",
"GRAPHITE2_NFILEFACE",
]
)
@@ -703,34 +703,34 @@ if env["static_icu_data"]:
env_icu.Command(
"../../../thirdparty/icu4c/icudata.gen.h", "../../../thirdparty/icu4c/icudt_godot.dat", methods.make_icu_data
)
env.Append(CXXFLAGS=["-DICU_STATIC_DATA"])
env.Append(CPPDEFINES=["ICU_STATIC_DATA"])
env.Append(CPPPATH=["../../../thirdparty/icu4c/"])
else:
thirdparty_icu_sources += ["../icu_data/icudata_stub.cpp"]
env_icu.Append(CPPPATH=["../../../thirdparty/icu4c/common/", "../../../thirdparty/icu4c/i18n/"])
env_icu.Append(
CXXFLAGS=[
"-DU_STATIC_IMPLEMENTATION",
"-DU_COMMON_IMPLEMENTATION",
"-DUCONFIG_NO_COLLATION",
"-DUCONFIG_NO_CONVERSION",
"-DUCONFIG_NO_FORMATTING",
"-DUCONFIG_NO_SERVICE",
"-DUCONFIG_NO_IDNA",
"-DUCONFIG_NO_FILE_IO",
"-DUCONFIG_NO_TRANSLITERATION",
"-DPKGDATA_MODE=static",
"-DU_ENABLE_DYLOAD=0",
"-DU_HAVE_LIB_SUFFIX=1",
"-DU_LIB_SUFFIX_C_NAME=_godot",
CPPDEFINES=[
"U_STATIC_IMPLEMENTATION",
"U_COMMON_IMPLEMENTATION",
"UCONFIG_NO_COLLATION",
"UCONFIG_NO_CONVERSION",
"UCONFIG_NO_FORMATTING",
"UCONFIG_NO_SERVICE",
"UCONFIG_NO_IDNA",
"UCONFIG_NO_FILE_IO",
"UCONFIG_NO_TRANSLITERATION",
("PKGDATA_MODE", "static"),
("U_ENABLE_DYLOAD", 0),
("U_HAVE_LIB_SUFFIX", 1),
("U_LIB_SUFFIX_C_NAME", "_godot"),
]
)
env.Append(
CXXFLAGS=[
"-DU_STATIC_IMPLEMENTATION",
"-DU_HAVE_LIB_SUFFIX=1",
"-DU_LIB_SUFFIX_C_NAME=_godot",
CPPDEFINES=[
"U_STATIC_IMPLEMENTATION",
("U_HAVE_LIB_SUFFIX", 1),
("U_LIB_SUFFIX_C_NAME", "_godot"),
]
)
env.Append(CPPPATH=["../../../thirdparty/icu4c/common/", "../../../thirdparty/icu4c/i18n/"])