|
@@ -35,7 +35,7 @@ msdfgen_enabled = "msdfgen" in env.module_list
|
|
|
|
|
|
if "svg" in env.module_list:
|
|
if "svg" in env.module_list:
|
|
env_text_server_adv.Prepend(
|
|
env_text_server_adv.Prepend(
|
|
- CPPPATH=[
|
|
|
|
|
|
+ CPPEXTPATH=[
|
|
"#thirdparty/thorvg/inc",
|
|
"#thirdparty/thorvg/inc",
|
|
"#thirdparty/thorvg/src/common",
|
|
"#thirdparty/thorvg/src/common",
|
|
"#thirdparty/thorvg/src/renderer",
|
|
"#thirdparty/thorvg/src/renderer",
|
|
@@ -135,11 +135,11 @@ if env["builtin_harfbuzz"]:
|
|
]
|
|
]
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
|
|
|
|
- env_harfbuzz.Prepend(CPPPATH=["#thirdparty/harfbuzz/src"])
|
|
|
|
|
|
+ env_harfbuzz.Prepend(CPPEXTPATH=["#thirdparty/harfbuzz/src"])
|
|
|
|
|
|
env_harfbuzz.Append(CCFLAGS=["-DHAVE_ICU"])
|
|
env_harfbuzz.Append(CCFLAGS=["-DHAVE_ICU"])
|
|
if env["builtin_icu4c"]:
|
|
if env["builtin_icu4c"]:
|
|
- env_harfbuzz.Prepend(CPPPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
|
|
|
|
|
+ env_harfbuzz.Prepend(CPPEXTPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
|
env_harfbuzz.Append(
|
|
env_harfbuzz.Append(
|
|
CCFLAGS=[
|
|
CCFLAGS=[
|
|
"-DU_STATIC_IMPLEMENTATION",
|
|
"-DU_STATIC_IMPLEMENTATION",
|
|
@@ -162,15 +162,15 @@ if env["builtin_harfbuzz"]:
|
|
]
|
|
]
|
|
)
|
|
)
|
|
if env["builtin_freetype"]:
|
|
if env["builtin_freetype"]:
|
|
- env_harfbuzz.Prepend(CPPPATH=["#thirdparty/freetype/include"])
|
|
|
|
|
|
+ env_harfbuzz.Prepend(CPPEXTPATH=["#thirdparty/freetype/include"])
|
|
if env["builtin_graphite"] and env["graphite"]:
|
|
if env["builtin_graphite"] and env["graphite"]:
|
|
- env_harfbuzz.Prepend(CPPPATH=["#thirdparty/graphite/include"])
|
|
|
|
|
|
+ env_harfbuzz.Prepend(CPPEXTPATH=["#thirdparty/graphite/include"])
|
|
env_harfbuzz.Append(CCFLAGS=["-DGRAPHITE2_STATIC"])
|
|
env_harfbuzz.Append(CCFLAGS=["-DGRAPHITE2_STATIC"])
|
|
|
|
|
|
if env["platform"] in ["android", "linuxbsd", "web"]:
|
|
if env["platform"] in ["android", "linuxbsd", "web"]:
|
|
env_harfbuzz.Append(CCFLAGS=["-DHAVE_PTHREAD"])
|
|
env_harfbuzz.Append(CCFLAGS=["-DHAVE_PTHREAD"])
|
|
|
|
|
|
- env_text_server_adv.Prepend(CPPPATH=["#thirdparty/harfbuzz/src"])
|
|
|
|
|
|
+ env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/harfbuzz/src"])
|
|
|
|
|
|
lib = env_harfbuzz.add_library("harfbuzz_builtin", thirdparty_sources)
|
|
lib = env_harfbuzz.add_library("harfbuzz_builtin", thirdparty_sources)
|
|
thirdparty_obj += lib
|
|
thirdparty_obj += lib
|
|
@@ -233,7 +233,7 @@ if env["builtin_graphite"] and freetype_enabled and env["graphite"]:
|
|
|
|
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
|
|
|
|
- env_graphite.Prepend(CPPPATH=["#thirdparty/graphite/src", "#thirdparty/graphite/include"])
|
|
|
|
|
|
+ env_graphite.Prepend(CPPEXTPATH=["#thirdparty/graphite/src", "#thirdparty/graphite/include"])
|
|
env_graphite.Append(
|
|
env_graphite.Append(
|
|
CCFLAGS=[
|
|
CCFLAGS=[
|
|
"-DGRAPHITE2_STATIC",
|
|
"-DGRAPHITE2_STATIC",
|
|
@@ -473,15 +473,10 @@ if env["builtin_icu4c"]:
|
|
]
|
|
]
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
|
|
|
|
- if env.editor_build:
|
|
|
|
- env_icu.CommandNoCache(
|
|
|
|
- "#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/icudt_godot.dat", env.Run(make_icu_data)
|
|
|
|
- )
|
|
|
|
- env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/"])
|
|
|
|
- else:
|
|
|
|
|
|
+ if not env.editor_build:
|
|
thirdparty_sources += ["icu_data/icudata_stub.cpp"]
|
|
thirdparty_sources += ["icu_data/icudata_stub.cpp"]
|
|
|
|
|
|
- env_icu.Prepend(CPPPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
|
|
|
|
|
+ env_icu.Prepend(CPPEXTPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
|
env_icu.Append(
|
|
env_icu.Append(
|
|
CXXFLAGS=[
|
|
CXXFLAGS=[
|
|
"-DU_STATIC_IMPLEMENTATION",
|
|
"-DU_STATIC_IMPLEMENTATION",
|
|
@@ -510,11 +505,18 @@ if env["builtin_icu4c"]:
|
|
if env.editor_build:
|
|
if env.editor_build:
|
|
env_text_server_adv.Append(CXXFLAGS=["-DICU_STATIC_DATA"])
|
|
env_text_server_adv.Append(CXXFLAGS=["-DICU_STATIC_DATA"])
|
|
|
|
|
|
- env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
|
|
|
|
|
+ env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
|
|
|
|
|
lib = env_icu.add_library("icu_builtin", thirdparty_sources)
|
|
lib = env_icu.add_library("icu_builtin", thirdparty_sources)
|
|
thirdparty_obj += lib
|
|
thirdparty_obj += lib
|
|
|
|
|
|
|
|
+ if env.editor_build:
|
|
|
|
+ icudata = env_icu.CommandNoCache(
|
|
|
|
+ "#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/icudt_godot.dat", env.Run(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,
|
|
# 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
|
|
# 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")
|
|
# LIBS contains first SCons Library objects ("SCons.Node.FS.File object")
|
|
@@ -534,19 +536,15 @@ if env["builtin_icu4c"]:
|
|
module_obj = []
|
|
module_obj = []
|
|
|
|
|
|
if env["builtin_msdfgen"] and msdfgen_enabled:
|
|
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.Append(CPPDEFINES=[("MSDFGEN_PUBLIC", "")])
|
|
- if not env.msvc:
|
|
|
|
- env_text_server_adv.Append(CPPFLAGS=["-isystem", Dir("#thirdparty/msdfgen").path])
|
|
|
|
- else:
|
|
|
|
- env_text_server_adv.Prepend(CPPPATH=["#thirdparty/msdfgen"])
|
|
|
|
|
|
+ env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/msdfgen"])
|
|
|
|
|
|
if env["builtin_freetype"] and freetype_enabled:
|
|
if env["builtin_freetype"] and freetype_enabled:
|
|
env_text_server_adv.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"])
|
|
env_text_server_adv.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"])
|
|
- env_text_server_adv.Prepend(CPPPATH=["#thirdparty/freetype/include"])
|
|
|
|
|
|
+ env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/freetype/include"])
|
|
|
|
|
|
if env["builtin_graphite"] and freetype_enabled and env["graphite"]:
|
|
if env["builtin_graphite"] and freetype_enabled and env["graphite"]:
|
|
- env_text_server_adv.Prepend(CPPPATH=["#thirdparty/graphite/include"])
|
|
|
|
|
|
+ env_text_server_adv.Prepend(CPPEXTPATH=["#thirdparty/graphite/include"])
|
|
|
|
|
|
env_text_server_adv.add_source_files(module_obj, "*.cpp")
|
|
env_text_server_adv.add_source_files(module_obj, "*.cpp")
|
|
env.modules_sources += module_obj
|
|
env.modules_sources += module_obj
|