Skip to content

Commit 17afe03

Browse files
committed
Add subdirectories to source file collection logic in SConstruct using os.walk
Added automatic file collection using os.walk so that source files in subdirectories of src/ get properly detected by SConstruct.
1 parent 3ae88f7 commit 17afe03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SConstruct

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ env = SConscript("godot-cpp/SConstruct", {"env": env, "customs": customs})
3939

4040
env.Append(CPPPATH=["src/"])
4141
sources = Glob("src/*.cpp")
42+
for root, folders, files in os.walk("src"):
43+
if root.endswith("gen"):
44+
continue
45+
sources += Glob(os.path.join(root, "*.cpp"))
4246

4347
if env["target"] in ["editor", "template_debug"]:
4448
try:

0 commit comments

Comments
 (0)