Skip to content

Commit f40cc47

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 f40cc47

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
@@ -38,6 +38,10 @@ Run the following command to download godot-cpp:
3838
env = SConscript("godot-cpp/SConstruct", {"env": env, "customs": customs})
3939

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

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

0 commit comments

Comments
 (0)