Revert "SCons: Add CPPEXTPATH for external includes"
This commit is contained in:
@ -16,7 +16,7 @@ msdfgen_enabled = "msdfgen" in env.module_list
|
||||
|
||||
if "svg" in env.module_list:
|
||||
env_text_server_adv.Prepend(
|
||||
CPPEXTPATH=[
|
||||
CPPPATH=[
|
||||
"#thirdparty/thorvg/inc",
|
||||
"#thirdparty/thorvg/src/common",
|
||||
"#thirdparty/thorvg/src/renderer",
|
||||
@ -120,11 +120,11 @@ if env["builtin_harfbuzz"]:
|
||||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_harfbuzz.Prepend(CPPEXTPATH=["#thirdparty/harfbuzz/src"])
|
||||
env_harfbuzz.Prepend(CPPPATH=["#thirdparty/harfbuzz/src"])
|
||||
|
||||
env_harfbuzz.Append(CPPDEFINES=["HAVE_ICU"])
|
||||
if env["builtin_icu4c"]:
|
||||
env_harfbuzz.Prepend(CPPEXTPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
||||
env_harfbuzz.Prepend(CPPPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
||||
env_harfbuzz.Append(
|
||||
CPPDEFINES=[
|
||||
"U_STATIC_IMPLEMENTATION",
|
||||
@ -139,15 +139,14 @@ if env["builtin_harfbuzz"]:
|
||||
if env["graphite"]:
|
||||
env_harfbuzz.Append(CPPDEFINES=["HAVE_GRAPHITE2"])
|
||||
if env["builtin_freetype"]:
|
||||
env_harfbuzz.Prepend(CPPEXTPATH=["#thirdparty/freetype/include"])
|
||||
env_harfbuzz.Prepend(CPPPATH=["#thirdparty/freetype/include"])
|
||||
if env["builtin_graphite"] and env["graphite"]:
|
||||
env_harfbuzz.Prepend(CPPEXTPATH=["#thirdparty/graphite/include"])
|
||||
env_harfbuzz.Prepend(CPPPATH=["#thirdparty/graphite/include"])
|
||||
env_harfbuzz.Append(CPPDEFINES=["GRAPHITE2_STATIC"])
|
||||
|
||||
if env["platform"] in ["android", "linuxbsd", "web"]:
|
||||
env_harfbuzz.Append(CPPDEFINES=["HAVE_PTHREAD"])
|
||||
|
||||
env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/harfbuzz/src"])
|
||||
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/harfbuzz/src"])
|
||||
|
||||
lib = env_harfbuzz.add_library("harfbuzz_builtin", thirdparty_sources)
|
||||
thirdparty_obj += lib
|
||||
@ -210,7 +209,7 @@ if env["builtin_graphite"] and freetype_enabled and env["graphite"]:
|
||||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_graphite.Prepend(CPPEXTPATH=["#thirdparty/graphite/src", "#thirdparty/graphite/include"])
|
||||
env_graphite.Prepend(CPPPATH=["#thirdparty/graphite/src", "#thirdparty/graphite/include"])
|
||||
env_graphite.Append(
|
||||
CPPDEFINES=[
|
||||
"GRAPHITE2_STATIC",
|
||||
@ -450,10 +449,17 @@ if env["builtin_icu4c"]:
|
||||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
if not env.editor_build:
|
||||
if env.editor_build:
|
||||
icudata = env_icu.CommandNoCache(
|
||||
"#thirdparty/icu4c/icudata.gen.h",
|
||||
"#thirdparty/icu4c/icudt_godot.dat",
|
||||
env.Run(text_server_adv_builders.make_icu_data),
|
||||
)
|
||||
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/"])
|
||||
else:
|
||||
thirdparty_sources += ["icu_data/icudata_stub.cpp"]
|
||||
|
||||
env_icu.Prepend(CPPEXTPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
||||
env_icu.Prepend(CPPPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
||||
env_icu.Append(
|
||||
CPPDEFINES=[
|
||||
"U_STATIC_IMPLEMENTATION",
|
||||
@ -482,20 +488,11 @@ if env["builtin_icu4c"]:
|
||||
if env.editor_build:
|
||||
env_text_server_adv.Append(CPPDEFINES=["ICU_STATIC_DATA"])
|
||||
|
||||
env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
||||
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
||||
|
||||
lib = env_icu.add_library("icu_builtin", thirdparty_sources)
|
||||
thirdparty_obj += lib
|
||||
|
||||
if env.editor_build:
|
||||
icudata = env_icu.CommandNoCache(
|
||||
"#thirdparty/icu4c/icudata.gen.h",
|
||||
"#thirdparty/icu4c/icudt_godot.dat",
|
||||
env.Run(text_server_adv_builders.make_icu_data),
|
||||
)
|
||||
env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/icu4c/"])
|
||||
env_icu.Depends(lib, icudata)
|
||||
|
||||
# Needs to be appended to arrive after libscene in the linker call,
|
||||
# but we don't want it to arrive *after* system libs, so manual hack
|
||||
# LIBS contains first SCons Library objects ("SCons.Node.FS.File object")
|
||||
@ -515,15 +512,19 @@ if env["builtin_icu4c"]:
|
||||
module_obj = []
|
||||
|
||||
if env["builtin_msdfgen"] and msdfgen_enabled:
|
||||
# Treat msdfgen headers as system headers to avoid raising warnings. Not supported on MSVC.
|
||||
env_text_server_adv.Append(CPPDEFINES=[("MSDFGEN_PUBLIC", "")])
|
||||
env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/msdfgen"])
|
||||
if not env.msvc:
|
||||
env_text_server_adv.Append(CPPFLAGS=["-isystem", Dir("#thirdparty/msdfgen").path])
|
||||
else:
|
||||
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/msdfgen"])
|
||||
|
||||
if env["builtin_freetype"] and freetype_enabled:
|
||||
env_text_server_adv.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"])
|
||||
env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/freetype/include"])
|
||||
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/freetype/include"])
|
||||
|
||||
if env["builtin_graphite"] and freetype_enabled and env["graphite"]:
|
||||
env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/graphite/include"])
|
||||
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/graphite/include"])
|
||||
|
||||
env_text_server_adv.add_source_files(module_obj, "*.cpp")
|
||||
env.modules_sources += module_obj
|
||||
|
||||
Reference in New Issue
Block a user