Skip to content

Commit 390717c

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 390717c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

SConstruct

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,15 @@ 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")
46+
for root, folders, files in os.walk("src"):
47+
if root.endswith("gen"):
48+
continue
49+
sources += Glob(os.path.join(root, "*.cpp"))
4250

4351
if env["target"] in ["editor", "template_debug"]:
4452
try:

0 commit comments

Comments
 (0)