Merge pull request #111331 from Repiteo/scons/revert-cppextpath
Revert "SCons: Add `CPPEXTPATH` for external includes"
This commit is contained in:
commit
9052d31c68
55 changed files with 220 additions and 147 deletions
|
|
@ -37,7 +37,7 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_astcenc.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_astcenc.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_astcenc.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -45,13 +45,17 @@ if basisu_encoder:
|
|||
|
||||
transcoder_sources = [thirdparty_dir + "transcoder/basisu_transcoder.cpp"]
|
||||
|
||||
env_basisu.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
# Treat Basis headers as system headers to avoid raising warnings. Not supported on MSVC.
|
||||
if not env.msvc:
|
||||
env_basisu.Append(CPPFLAGS=["-isystem", Dir(thirdparty_dir).path])
|
||||
else:
|
||||
env_basisu.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
if basisu_encoder:
|
||||
env_basisu.Prepend(CPPEXTPATH=["#thirdparty/tinyexr"])
|
||||
env_basisu.Prepend(CPPPATH=["#thirdparty/tinyexr"])
|
||||
|
||||
if env["builtin_zstd"]:
|
||||
env_basisu.Prepend(CPPEXTPATH=["#thirdparty/zstd"])
|
||||
env_basisu.Prepend(CPPPATH=["#thirdparty/zstd"])
|
||||
|
||||
env_thirdparty = env_basisu.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ thirdparty_sources = [
|
|||
]
|
||||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
env_csg.Prepend(CPPEXTPATH=[thirdparty_dir + "include"])
|
||||
env_csg.Prepend(CPPPATH=[thirdparty_dir + "include"])
|
||||
env_thirdparty = env_csg.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ thirdparty_sources = [
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_cvtt.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_cvtt.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_cvtt.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ if env["builtin_enet"]:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_enet.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_enet.Prepend(CPPPATH=[thirdparty_dir])
|
||||
env_enet.Append(CPPDEFINES=["GODOT_ENET"])
|
||||
|
||||
env_thirdparty = env_enet.Clone()
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_etcpak.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_etcpak.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_etcpak.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ thirdparty_obj = []
|
|||
thirdparty_dir = "#thirdparty/ufbx/"
|
||||
thirdparty_sources = [thirdparty_dir + "ufbx.c"]
|
||||
|
||||
env_fbx.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_fbx.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_fbx.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -62,15 +62,15 @@ if env["builtin_freetype"]:
|
|||
if env["brotli"]:
|
||||
env_freetype.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"])
|
||||
|
||||
env_freetype.Prepend(CPPEXTPATH=[thirdparty_dir + "/include"])
|
||||
env_freetype.Prepend(CPPPATH=[thirdparty_dir + "/include"])
|
||||
# Also needed in main env for scene/
|
||||
env.Prepend(CPPEXTPATH=[thirdparty_dir + "/include"])
|
||||
env.Prepend(CPPPATH=[thirdparty_dir + "/include"])
|
||||
|
||||
env_freetype.Append(CPPDEFINES=["FT2_BUILD_LIBRARY", "FT_CONFIG_OPTION_USE_PNG", "FT_CONFIG_OPTION_SYSTEM_ZLIB"])
|
||||
|
||||
# Also requires libpng headers
|
||||
if env["builtin_libpng"]:
|
||||
env_freetype.Prepend(CPPEXTPATH=["#thirdparty/libpng"])
|
||||
env_freetype.Prepend(CPPPATH=["#thirdparty/libpng"])
|
||||
|
||||
sfnt = thirdparty_dir + "src/sfnt/sfnt.c"
|
||||
# Must be done after all CPPDEFINES are being set so we can copy them.
|
||||
|
|
|
|||
|
|
@ -62,9 +62,13 @@ if env["builtin_glslang"]:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
# Treat glslang headers as system headers to avoid raising warnings. Not supported on MSVC.
|
||||
# Include `#thirdparty` to workaround mismatch between location of `SPIRV` in library source
|
||||
# and in installed public headers.
|
||||
env_glslang.Prepend(CPPEXTPATH=[thirdparty_dir, "#thirdparty"])
|
||||
if not env.msvc:
|
||||
env_glslang.Append(CPPFLAGS=["-isystem", Dir(thirdparty_dir).path, "-isystem", Dir("#thirdparty").path])
|
||||
else:
|
||||
env_glslang.Prepend(CPPPATH=[thirdparty_dir, "#thirdparty"])
|
||||
|
||||
env_glslang.Append(CPPDEFINES=[("ENABLE_OPT", 0)])
|
||||
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ thirdparty_sources = [
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_jolt.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_jolt.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
if env.dev_build:
|
||||
env_jolt.Append(CPPDEFINES=["JPH_ENABLE_ASSERTS"])
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ if env["builtin_libjpeg_turbo"]:
|
|||
def source_paths(files):
|
||||
return [thirdparty_dir + "/src/" + f for f in files]
|
||||
|
||||
env_jpg.Prepend(CPPEXTPATH=[thirdparty_dir + "/src"])
|
||||
env_jpg.Prepend(CPPPATH=[thirdparty_dir + "/src"])
|
||||
|
||||
def add_bit_depth(bit_depth: int):
|
||||
env_bit_depth = env_jpg.Clone()
|
||||
|
|
|
|||
|
|
@ -34,19 +34,19 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_ktx.Prepend(CPPEXTPATH=[thirdparty_dir + "include"])
|
||||
env_ktx.Prepend(CPPEXTPATH=[thirdparty_dir + "utils"])
|
||||
env_ktx.Prepend(CPPEXTPATH=[thirdparty_dir + "lib"])
|
||||
env_ktx.Prepend(CPPEXTPATH=[thirdparty_dir + "other_include"])
|
||||
env_ktx.Prepend(CPPEXTPATH=[thirdparty_dir + "external"])
|
||||
env_ktx.Prepend(CPPPATH=[thirdparty_dir + "include"])
|
||||
env_ktx.Prepend(CPPPATH=[thirdparty_dir + "utils"])
|
||||
env_ktx.Prepend(CPPPATH=[thirdparty_dir + "lib"])
|
||||
env_ktx.Prepend(CPPPATH=[thirdparty_dir + "other_include"])
|
||||
env_ktx.Prepend(CPPPATH=[thirdparty_dir + "external"])
|
||||
|
||||
env_ktx.Prepend(CPPEXTPATH=["#thirdparty/basis_universal"])
|
||||
env_ktx.Prepend(CPPPATH=["#thirdparty/basis_universal"])
|
||||
if env.editor_build:
|
||||
# We already build miniz in the basis_universal module (editor only).
|
||||
env_ktx.Append(CPPDEFINES=["MINIZ_HEADER_FILE_ONLY"])
|
||||
|
||||
if env["vulkan"]:
|
||||
env_ktx.Prepend(CPPEXTPATH=["#thirdparty/vulkan/include"])
|
||||
env_ktx.Prepend(CPPPATH=["#thirdparty/vulkan/include"])
|
||||
else:
|
||||
# Falls back on bundled `vkformat_enum.h`.
|
||||
env_ktx.Append(CPPDEFINES=["LIBKTX"])
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ if env["builtin_mbedtls"]:
|
|||
thirdparty_dir = "#thirdparty/mbedtls/library/"
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_mbed_tls.Prepend(CPPEXTPATH=["#thirdparty/mbedtls/include/"])
|
||||
env_mbed_tls.Prepend(CPPPATH=["#thirdparty/mbedtls/include/"])
|
||||
config_path = "thirdparty/mbedtls/include/godot_module_mbedtls_config.h"
|
||||
config_path = f"<{config_path}>" if env_mbed_tls["ninja"] and env_mbed_tls.msvc else f'\\"{config_path}\\"'
|
||||
env_mbed_tls.Append(CPPDEFINES=[("MBEDTLS_CONFIG_FILE", config_path)])
|
||||
|
|
|
|||
|
|
@ -8,7 +8,11 @@ env_minimp3 = env_modules.Clone()
|
|||
|
||||
thirdparty_dir = "#thirdparty/minimp3/"
|
||||
|
||||
env_minimp3.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
# Treat minimp3 headers as system headers to avoid raising warnings. Not supported on MSVC.
|
||||
if not env.msvc:
|
||||
env_minimp3.Append(CPPFLAGS=["-isystem", Dir(thirdparty_dir).path])
|
||||
else:
|
||||
env_minimp3.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
if not env["minimp3_extra_formats"]:
|
||||
env_minimp3.Append(CPPDEFINES=["MINIMP3_ONLY_MP3"])
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ if env["builtin_msdfgen"]:
|
|||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_msdfgen.Append(CPPDEFINES=[("MSDFGEN_PUBLIC", "")])
|
||||
env_msdfgen.Prepend(CPPEXTPATH=["#thirdparty/freetype/include", "#thirdparty/msdfgen", "#thirdparty/nanosvg"])
|
||||
env_msdfgen.Prepend(CPPPATH=["#thirdparty/freetype/include", "#thirdparty/msdfgen", "#thirdparty/nanosvg"])
|
||||
|
||||
lib = env_msdfgen.add_library("msdfgen_builtin", thirdparty_sources)
|
||||
thirdparty_obj += lib
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ if env["builtin_rvo2_2d"]:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_navigation_2d.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_navigation_2d.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_navigation_2d.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ if env["builtin_recastnavigation"]:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_navigation_3d.Prepend(CPPEXTPATH=[thirdparty_dir + "Include"])
|
||||
env_navigation_3d.Prepend(CPPPATH=[thirdparty_dir + "Include"])
|
||||
|
||||
env_thirdparty = env_navigation_3d.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
@ -46,7 +46,7 @@ if env["builtin_rvo2_2d"]:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_navigation_3d.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_navigation_3d.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
# Don't build rvo_2d if 2D navigation is enabled.
|
||||
if not navigation_2d_enabled:
|
||||
|
|
@ -64,7 +64,7 @@ if env["builtin_rvo2_3d"]:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_navigation_3d.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_navigation_3d.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_navigation_3d.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Import("env_modules")
|
|||
env_noise = env_modules.Clone()
|
||||
|
||||
thirdparty_dir = "#thirdparty/noise/"
|
||||
env_noise.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_noise.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
# Godot source files
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ if env["builtin_libogg"]:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_ogg.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_ogg.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_ogg.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ elif env["platform"] == "linuxbsd":
|
|||
|
||||
if env["wayland"] and env["opengl3"]:
|
||||
env_openxr.AppendUnique(CPPDEFINES=["XR_USE_PLATFORM_EGL", "XRDEPENDENCIES_USE_GLAD"])
|
||||
env_openxr.Prepend(CPPEXTPATH=["#thirdparty/glad"])
|
||||
env_openxr.Prepend(CPPPATH=["#thirdparty/glad"])
|
||||
|
||||
# FIXME: Review what needs to be set for Android and macOS.
|
||||
# FreeBSD uses non-standard getenv functions.
|
||||
|
|
@ -50,7 +50,7 @@ if env["builtin_openxr"]:
|
|||
thirdparty_dir = "#thirdparty/openxr"
|
||||
|
||||
env_openxr.Prepend(
|
||||
CPPEXTPATH=[
|
||||
CPPPATH=[
|
||||
thirdparty_dir,
|
||||
thirdparty_dir + "/include",
|
||||
thirdparty_dir + "/src",
|
||||
|
|
@ -66,7 +66,7 @@ if env["builtin_openxr"]:
|
|||
if env["disable_exceptions"]:
|
||||
env_thirdparty.AppendUnique(CPPDEFINES=["XRLOADER_DISABLE_EXCEPTION_HANDLING", ("JSON_USE_EXCEPTION", 0)])
|
||||
|
||||
env_thirdparty.Append(CPPEXTPATH=[thirdparty_dir + "/src/loader"])
|
||||
env_thirdparty.Append(CPPPATH=[thirdparty_dir + "/src/loader"])
|
||||
|
||||
# add in external jsoncpp dependency
|
||||
thirdparty_jsoncpp_dir = thirdparty_dir + "/src/external/jsoncpp/src/lib_json/"
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ if env["builtin_embree"]:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in embree_src]
|
||||
|
||||
env_raycast.Prepend(CPPEXTPATH=[thirdparty_dir, thirdparty_dir + "include"])
|
||||
env_raycast.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "include"])
|
||||
env_raycast.Append(CPPDEFINES=["EMBREE_TARGET_SSE2", "EMBREE_LOWEST_ISA", "TASKING_INTERNAL"])
|
||||
env_raycast.AppendUnique(CPPDEFINES=["NDEBUG"]) # No assert() even in debug builds.
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ if env["builtin_pcre2"]:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_regex.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_regex.Prepend(CPPPATH=[thirdparty_dir])
|
||||
env_regex.Append(CPPDEFINES=thirdparty_flags)
|
||||
|
||||
def pcre2_builtin(width):
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ if env["module_jpg_enabled"]:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_svg.Prepend(CPPEXTPATH=[thirdparty_dir + "inc"])
|
||||
env_svg.Prepend(CPPPATH=[thirdparty_dir + "inc"])
|
||||
|
||||
# Enable ThorVG static object linking.
|
||||
env_svg.Append(CPPDEFINES=["TVG_STATIC"])
|
||||
|
|
@ -76,7 +76,7 @@ env_svg.Append(CPPDEFINES=["THORVG_FILE_IO_SUPPORT"])
|
|||
env_thirdparty = env_svg.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
env_thirdparty.Prepend(
|
||||
CPPEXTPATH=[
|
||||
CPPPATH=[
|
||||
thirdparty_dir + "src/common",
|
||||
thirdparty_dir + "src/loaders/svg",
|
||||
thirdparty_dir + "src/renderer",
|
||||
|
|
@ -86,15 +86,15 @@ env_thirdparty.Prepend(
|
|||
]
|
||||
)
|
||||
if env["builtin_libpng"]:
|
||||
env_thirdparty.Prepend(CPPEXTPATH=["#thirdparty/libpng"])
|
||||
env_thirdparty.Prepend(CPPPATH=["#thirdparty/libpng"])
|
||||
if env["module_webp_enabled"]:
|
||||
env_thirdparty.Prepend(CPPEXTPATH=[thirdparty_dir + "src/loaders/external_webp"])
|
||||
env_thirdparty.Prepend(CPPPATH=[thirdparty_dir + "src/loaders/external_webp"])
|
||||
if env["builtin_libwebp"]:
|
||||
env_thirdparty.Prepend(CPPEXTPATH=["#thirdparty/libwebp/src"])
|
||||
env_thirdparty.Prepend(CPPPATH=["#thirdparty/libwebp/src"])
|
||||
if env["module_jpg_enabled"]:
|
||||
env_thirdparty.Prepend(CPPEXTPATH=[thirdparty_dir + "src/loaders/external_jpg"])
|
||||
env_thirdparty.Prepend(CPPPATH=[thirdparty_dir + "src/loaders/external_jpg"])
|
||||
if env["builtin_libjpeg_turbo"]:
|
||||
env_thirdparty.Prepend(CPPEXTPATH=["#thirdparty/libjpeg-turbo/src"])
|
||||
env_thirdparty.Prepend(CPPPATH=["#thirdparty/libjpeg-turbo/src"])
|
||||
|
||||
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
|
||||
env.modules_sources += thirdparty_obj
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -67,11 +67,15 @@ using namespace godot;
|
|||
// Thirdparty headers.
|
||||
|
||||
#ifdef MODULE_MSDFGEN_ENABLED
|
||||
GODOT_MSVC_WARNING_PUSH_AND_IGNORE(4458) // "Declaration of 'identifier' hides class member".
|
||||
|
||||
#include <core/EdgeHolder.h>
|
||||
#include <core/ShapeDistanceFinder.h>
|
||||
#include <core/contour-combiners.h>
|
||||
#include <core/edge-selectors.h>
|
||||
#include <msdfgen.h>
|
||||
|
||||
GODOT_MSVC_WARNING_POP
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_SVG_ENABLED
|
||||
|
|
|
|||
|
|
@ -94,6 +94,11 @@ using namespace godot;
|
|||
|
||||
// Thirdparty headers.
|
||||
|
||||
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Wshadow")
|
||||
#ifdef __EMSCRIPTEN__
|
||||
GODOT_CLANG_WARNING_PUSH_AND_IGNORE("-Wunnecessary-virtual-specifier")
|
||||
#endif
|
||||
|
||||
#include <unicode/ubidi.h>
|
||||
#include <unicode/ubrk.h>
|
||||
#include <unicode/uchar.h>
|
||||
|
|
@ -107,6 +112,11 @@ using namespace godot;
|
|||
#include <unicode/ustring.h>
|
||||
#include <unicode/utypes.h>
|
||||
|
||||
GODOT_GCC_WARNING_POP
|
||||
#ifdef __EMSCRIPTEN__
|
||||
GODOT_CLANG_WARNING_POP
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_FREETYPE_ENABLED
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
|
|
|||
|
|
@ -11,17 +11,21 @@ env_text_server_fb = env_modules.Clone()
|
|||
|
||||
if "svg" in env.module_list:
|
||||
env_text_server_fb.Prepend(
|
||||
CPPEXTPATH=["#thirdparty/thorvg/inc", "#thirdparty/thorvg/src/common", "#thirdparty/thorvg/src/renderer"]
|
||||
CPPPATH=["#thirdparty/thorvg/inc", "#thirdparty/thorvg/src/common", "#thirdparty/thorvg/src/renderer"]
|
||||
)
|
||||
# Enable ThorVG static object linking.
|
||||
env_text_server_fb.Append(CPPDEFINES=["TVG_STATIC"])
|
||||
|
||||
if env["builtin_msdfgen"] and msdfgen_enabled:
|
||||
# Treat msdfgen headers as system headers to avoid raising warnings. Not supported on MSVC.
|
||||
env_text_server_fb.Append(CPPDEFINES=[("MSDFGEN_PUBLIC", "")])
|
||||
env_text_server_fb.Prepend(CPPEXTPATH=["#thirdparty/msdfgen"])
|
||||
if not env.msvc:
|
||||
env_text_server_fb.Append(CPPFLAGS=["-isystem", Dir("#thirdparty/msdfgen").path])
|
||||
else:
|
||||
env_text_server_fb.Prepend(CPPPATH=["#thirdparty/msdfgen"])
|
||||
|
||||
if env["builtin_freetype"] and freetype_enabled:
|
||||
env_text_server_fb.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"])
|
||||
env_text_server_fb.Prepend(CPPEXTPATH=["#thirdparty/freetype/include"])
|
||||
env_text_server_fb.Prepend(CPPPATH=["#thirdparty/freetype/include"])
|
||||
|
||||
env_text_server_fb.add_source_files(env.modules_sources, "*.cpp")
|
||||
|
|
|
|||
|
|
@ -62,11 +62,15 @@ using namespace godot;
|
|||
// Thirdparty headers.
|
||||
|
||||
#ifdef MODULE_MSDFGEN_ENABLED
|
||||
GODOT_MSVC_WARNING_PUSH_AND_IGNORE(4458) // "Declaration of 'identifier' hides class member".
|
||||
|
||||
#include <core/EdgeHolder.h>
|
||||
#include <core/ShapeDistanceFinder.h>
|
||||
#include <core/contour-combiners.h>
|
||||
#include <core/edge-selectors.h>
|
||||
#include <msdfgen.h>
|
||||
|
||||
GODOT_MSVC_WARNING_POP
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_FREETYPE_ENABLED
|
||||
|
|
|
|||
|
|
@ -86,13 +86,13 @@ if env["builtin_libtheora"]:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_theora.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_theora.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
# also requires libogg and libvorbis
|
||||
if env["builtin_libogg"]:
|
||||
env_theora.Prepend(CPPEXTPATH=["#thirdparty/libogg"])
|
||||
env_theora.Prepend(CPPPATH=["#thirdparty/libogg"])
|
||||
if env["builtin_libvorbis"]:
|
||||
env_theora.Prepend(CPPEXTPATH=["#thirdparty/libvorbis"])
|
||||
env_theora.Prepend(CPPPATH=["#thirdparty/libvorbis"])
|
||||
|
||||
env_thirdparty = env_theora.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ thirdparty_sources = [
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_tinyexr.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_tinyexr.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
# Enable threaded loading with C++11.
|
||||
env_tinyexr.Append(CPPDEFINES=["TINYEXR_USE_THREAD"])
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ if env["builtin_miniupnpc"] and env["platform"] != "web":
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + "src/" + file for file in thirdparty_sources]
|
||||
|
||||
env_upnp.Prepend(CPPEXTPATH=[thirdparty_dir + "include"])
|
||||
env_upnp.Prepend(CPPPATH=[thirdparty_dir + "include"])
|
||||
env_upnp.Append(CPPDEFINES=["MINIUPNP_STATICLIB"])
|
||||
if env["platform"] != "windows":
|
||||
env_upnp.Append(CPPDEFINES=["MINIUPNPC_SET_SOCKET_TIMEOUT"])
|
||||
|
||||
env_thirdparty = env_upnp.Clone()
|
||||
env_thirdparty.Prepend(CPPEXTPATH=[thirdparty_dir + "include/miniupnpc"])
|
||||
env_thirdparty.Prepend(CPPPATH=[thirdparty_dir + "include/miniupnpc"])
|
||||
env_thirdparty.disable_warnings()
|
||||
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
|
||||
env.modules_sources += thirdparty_obj
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ thirdparty_sources = [
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_vhacd.Prepend(CPPEXTPATH=[thirdparty_dir + "inc"])
|
||||
env_vhacd.Prepend(CPPPATH=[thirdparty_dir + "inc"])
|
||||
|
||||
env_thirdparty = env_vhacd.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ if env["builtin_libvorbis"]:
|
|||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_vorbis.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_vorbis.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
# also requires libogg
|
||||
if env["builtin_libogg"]:
|
||||
env_vorbis.Prepend(CPPEXTPATH=["#thirdparty/libogg"])
|
||||
env_vorbis.Prepend(CPPPATH=["#thirdparty/libogg"])
|
||||
|
||||
env_thirdparty = env_vorbis.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ if env["builtin_libwebp"]:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_webp.Prepend(CPPEXTPATH=[thirdparty_dir, thirdparty_dir + "src/"])
|
||||
env_webp.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "src/"])
|
||||
|
||||
env_thirdparty = env_webp.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ elif env["builtin_wslay"]:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + s for s in thirdparty_sources]
|
||||
|
||||
env_ws.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_ws.Prepend(CPPPATH=[thirdparty_dir])
|
||||
env_ws.Append(CPPDEFINES=["HAVE_CONFIG_H"])
|
||||
|
||||
if env["platform"] == "windows":
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ if env["builtin_xatlas"]:
|
|||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_xatlas_unwrap.Prepend(CPPEXTPATH=[thirdparty_dir])
|
||||
env_xatlas_unwrap.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
env_thirdparty = env_xatlas_unwrap.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue