mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
SCons: Fix uses of [].append instead of env.add_source_files()
Also added support for SCons project-absolute paths (starting with #) and warning about duplicates in add_source_files(), and fixed default_controller_mappings.gen.cpp being included twice after first build due to *.cpp globbing. Part of #30270.
This commit is contained in:
@@ -6,6 +6,7 @@ from platform_methods import run_in_subprocess
|
||||
import main_builders
|
||||
|
||||
env.main_sources = []
|
||||
|
||||
env.add_source_files(env.main_sources, "*.cpp")
|
||||
|
||||
# order matters here. higher index controller database files write on top of lower index database files
|
||||
@@ -14,7 +15,9 @@ controller_databases = ["#main/gamecontrollerdb.txt", "#main/gamecontrollerdb_20
|
||||
env.Depends("#main/default_controller_mappings.gen.cpp", controller_databases)
|
||||
env.CommandNoCache("#main/default_controller_mappings.gen.cpp", controller_databases, run_in_subprocess(main_builders.make_default_controller_mappings))
|
||||
|
||||
env.main_sources.append("#main/default_controller_mappings.gen.cpp")
|
||||
# Don't warn about duplicate entry here, we need it registered manually for first build,
|
||||
# even if later builds will pick it up twice due to above *.cpp globbing.
|
||||
env.add_source_files(env.main_sources, "#main/default_controller_mappings.gen.cpp", warn_duplicates=False)
|
||||
|
||||
env.Depends("#main/splash.gen.h", "#main/splash.png")
|
||||
env.CommandNoCache("#main/splash.gen.h", "#main/splash.png", run_in_subprocess(main_builders.make_splash))
|
||||
|
||||
Reference in New Issue
Block a user