Skip to content

Commit a979808

Browse files
authored
Made src subfolders detection stop at 3 layers of depth
Refactor source file collection to use Glob for multiple directories and only go up to 3 layers of depth
1 parent 6457b74 commit a979808

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

SConstruct

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ 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"))
41+
42+
sources = Glob("src/*.cpp")
43+
sources.extend(Glob("src/*/*.cpp"))
44+
sources.extend(Glob("src/*/*/*.cpp"))
45+
sources.extend(Glob("src/*/*/*/*.cpp"))
4546

4647
if env["target"] in ["editor", "template_debug"]:
4748
try:

0 commit comments

Comments
 (0)