Merge pull request #66242 from akien-mga/scons-unify-tools-target
This commit is contained in:
commit
f47979f087
42 changed files with 215 additions and 338 deletions
|
|
@ -40,12 +40,12 @@ if not env.msvc:
|
|||
else:
|
||||
env_basisu.Prepend(CPPPATH=[thirdparty_dir])
|
||||
|
||||
if env["target"] == "debug":
|
||||
if env.dev_build:
|
||||
env_basisu.Append(CPPDEFINES=[("BASISU_DEVEL_MESSAGES", 1), ("BASISD_ENABLE_DEBUG_FLAGS", 1)])
|
||||
|
||||
env_thirdparty = env_basisu.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
env_thirdparty.Append(CPPDEFINES=["BASISU_NO_IMG_LOADERS"])
|
||||
env_thirdparty.add_source_files(thirdparty_obj, encoder_sources)
|
||||
env_thirdparty.add_source_files(thirdparty_obj, transcoder_sources)
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ env_csg = env_modules.Clone()
|
|||
|
||||
# Godot source files
|
||||
env_csg.add_source_files(env.modules_sources, "*.cpp")
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
env_csg.add_source_files(env.modules_sources, "editor/*.cpp")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
def can_build(env, platform):
|
||||
return env["tools"]
|
||||
return env.editor_build
|
||||
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ def can_build(env, platform):
|
|||
# as doing lightmap generation and denoising on Android or Web
|
||||
# would be a bit far-fetched.
|
||||
desktop_platforms = ["linuxbsd", "macos", "windows"]
|
||||
return env["tools"] and platform in desktop_platforms and env["arch"] == "x86_64"
|
||||
return env.editor_build and platform in desktop_platforms and env["arch"] == "x86_64"
|
||||
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
def can_build(env, platform):
|
||||
return env["tools"]
|
||||
return env.editor_build
|
||||
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ if env["builtin_freetype"]:
|
|||
env.Prepend(CPPPATH=[thirdparty_dir + "/include"])
|
||||
|
||||
env_freetype.Append(CPPDEFINES=["FT2_BUILD_LIBRARY", "FT_CONFIG_OPTION_USE_PNG", "FT_CONFIG_OPTION_SYSTEM_ZLIB"])
|
||||
if env["target"] == "debug":
|
||||
if env.dev_build:
|
||||
env_freetype.Append(CPPDEFINES=["ZLIB_DEBUG"])
|
||||
|
||||
# Also requires libpng headers
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ env_gdscript = env_modules.Clone()
|
|||
|
||||
env_gdscript.add_source_files(env.modules_sources, "*.cpp")
|
||||
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
env_gdscript.add_source_files(env.modules_sources, "./editor/*.cpp")
|
||||
|
||||
SConscript("editor/script_templates/SCsub")
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ env_gltf = env_modules.Clone()
|
|||
env_gltf.add_source_files(env.modules_sources, "*.cpp")
|
||||
env_gltf.add_source_files(env.modules_sources, "structures/*.cpp")
|
||||
SConscript("extensions/SCsub")
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
env_gltf.add_source_files(env.modules_sources, "editor/*.cpp")
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ env_gridmap = env_modules.Clone()
|
|||
|
||||
# Godot source files
|
||||
env_gridmap.add_source_files(env.modules_sources, "*.cpp")
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
env_gridmap.add_source_files(env.modules_sources, "editor/*.cpp")
|
||||
|
|
|
|||
|
|
@ -26,6 +26,6 @@ if env["platform"] in ["macos", "ios"]:
|
|||
elif env["platform"] == "android":
|
||||
env_mono.add_source_files(env.modules_sources, "mono_gd/android_mono_config.gen.cpp")
|
||||
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
env_mono.add_source_files(env.modules_sources, "editor/*.cpp")
|
||||
SConscript("editor/script_templates/SCsub")
|
||||
|
|
|
|||
|
|
@ -20,10 +20,7 @@ def configure(env, env_mono):
|
|||
# is_ios = env["platform"] == "ios"
|
||||
# is_ios_sim = is_ios and env["arch"] in ["x86_32", "x86_64"]
|
||||
|
||||
tools_enabled = env["tools"]
|
||||
|
||||
if tools_enabled and not module_supports_tools_on(env["platform"]):
|
||||
raise RuntimeError("This module does not currently support building for this platform with tools enabled")
|
||||
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
if not module_supports_tools_on(env["platform"]):
|
||||
raise RuntimeError("This module does not currently support building for this platform for editor builds.")
|
||||
env_mono.Append(CPPDEFINES=["GD_MONO_HOT_RELOAD"])
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ def can_build(env, platform):
|
|||
if env["arch"].startswith("rv"):
|
||||
return False
|
||||
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
env.module_add_dependencies("mono", ["regex"])
|
||||
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ env_mp = env_modules.Clone()
|
|||
module_obj = []
|
||||
env_mp.add_source_files(module_obj, "*.cpp")
|
||||
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
env_mp.add_source_files(module_obj, "editor/*.cpp")
|
||||
|
||||
env.modules_sources += module_obj
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ env.modules_sources += thirdparty_obj
|
|||
module_obj = []
|
||||
|
||||
env_navigation.add_source_files(module_obj, "*.cpp")
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
env_navigation.add_source_files(module_obj, "editor/*.cpp")
|
||||
env.modules_sources += module_obj
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ env_openxr.add_source_files(module_obj, "extensions/openxr_fb_passthrough_extens
|
|||
|
||||
env.modules_sources += module_obj
|
||||
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
SConscript("editor/SCsub")
|
||||
|
||||
# Needed to force rebuilding the module files when the thirdparty library is updated.
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ if env["builtin_icu"]:
|
|||
|
||||
icu_data_name = "icudt71l.dat"
|
||||
|
||||
if env_icu["tools"]:
|
||||
if env.editor_build:
|
||||
env_icu.Depends("#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/" + icu_data_name)
|
||||
env_icu.Command("#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/" + icu_data_name, make_icu_data)
|
||||
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/"])
|
||||
|
|
@ -482,7 +482,7 @@ if env["builtin_icu"]:
|
|||
"-DICU_DATA_NAME=" + icu_data_name,
|
||||
]
|
||||
)
|
||||
if env_text_server_adv["tools"]:
|
||||
if env.editor_build:
|
||||
env_text_server_adv.Append(CXXFLAGS=["-DICU_STATIC_DATA"])
|
||||
|
||||
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/common/", "#thirdparty/icu4c/i18n/"])
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ if env["freetype_enabled"]:
|
|||
"FT_CONFIG_OPTION_SYSTEM_ZLIB",
|
||||
]
|
||||
)
|
||||
if env["target"] == "debug":
|
||||
if env.dev_build:
|
||||
env_freetype.Append(CPPDEFINES=["ZLIB_DEBUG"])
|
||||
|
||||
env.Append(CPPDEFINES=["MODULE_FREETYPE_ENABLED"])
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ if env["freetype_enabled"]:
|
|||
"FT_CONFIG_OPTION_SYSTEM_ZLIB",
|
||||
]
|
||||
)
|
||||
if env["target"] == "debug":
|
||||
if env.dev_build:
|
||||
env_freetype.Append(CPPDEFINES=["ZLIB_DEBUG"])
|
||||
|
||||
env.Append(CPPDEFINES=["MODULE_FREETYPE_ENABLED"])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
def can_build(env, platform):
|
||||
return env["tools"]
|
||||
return env.editor_build
|
||||
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ elif env["builtin_wslay"]:
|
|||
module_obj = []
|
||||
|
||||
env_ws.add_source_files(module_obj, "*.cpp")
|
||||
if env["tools"]:
|
||||
if env.editor_build:
|
||||
env_ws.add_source_files(module_obj, "editor/*.cpp")
|
||||
env.modules_sources += module_obj
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
def can_build(env, platform):
|
||||
return env["tools"] and platform not in ["android", "ios"]
|
||||
return env.editor_build and platform not in ["android", "ios"]
|
||||
|
||||
|
||||
def configure(env):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue