Add subdirectories to source file collection logic in SConstruct up to 3 layers of depth

Added automatic file collection using Glob so that source files in directories that are up to 3 layers of depth into src/ get properly detected by SConstruct.
This commit is contained in:
Chkoupinator authored and chkoupinator committed 2025-11-01 15:04:33 +01:00
1 parent 1d3ae5ab95
commit 84c86b3d14
1 file changed
+4
+4
View File
@@ -38,7 +38,11 @@ Run the following command to download godot-cpp:
env = SConscript("godot-cpp/SConstruct", {"env": env, "customs": customs}) env = SConscript("godot-cpp/SConstruct", {"env": env, "customs": customs})
env.Append(CPPPATH=["src/"]) env.Append(CPPPATH=["src/"])
sources = Glob("src/*.cpp") sources = Glob("src/*.cpp")
sources.extend(Glob("src/*/*.cpp"))
sources.extend(Glob("src/*/*/*.cpp"))
sources.extend(Glob("src/*/*/*/*.cpp"))
if env["target"] in ["editor", "template_debug"]: if env["target"] in ["editor", "template_debug"]:
try: try: