Skip to content

Commit a95a162

Browse files
committed
Move some code around to avoid useless changes when merging
1 parent 5e38773 commit a95a162

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

SConstruct

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ build_dir = f"build/{lua_runtime}.{env["suffix"][1:]}"
2323
env["build_dir"] = build_dir
2424
VariantDir(build_dir, "src", duplicate=False)
2525

26-
source_directories = [".", "luaopen", "utils", "script-language"]
27-
sources = [
28-
Glob(f"{build_dir}/{directory}/*.cpp")
29-
for directory in source_directories
30-
]
31-
3226
# Add support for generating compilation database files
3327
env.Tool("compilation_db")
3428
compiledb = env.CompilationDatabase("compile_commands.json")
@@ -65,19 +59,25 @@ env.remove_options(env["CXXFLAGS"], "-fno-exceptions")
6559
if env["platform"] == "windows" and not env["use_mingw"]:
6660
env.Append(CXXFLAGS="/EHsc")
6761

62+
# Setup Lua, LuaJIT and Sol2
6863
if lua_runtime == "lua":
6964
env.Tool("lua", toolpath=["tools"])
7065
elif lua_runtime == "luajit":
7166
env.Tool("luajit", toolpath=["tools"])
7267
env.Tool("sol2", toolpath=["tools"])
7368

69+
# Build Lua GDExtension
70+
source_directories = [".", "luaopen", "utils", "script-language"]
71+
sources = [
72+
Glob(f"{build_dir}/{directory}/*.cpp")
73+
for directory in source_directories
74+
]
7475

75-
# Generate document
76+
# Generate documentation source file
7677
if env["target"] in ["editor", "template_debug"]:
7778
doc_data = env.GodotCPPDocData("src/generated-document/doc_data.gen.cpp", source=Glob("doc_classes/*.xml"))
7879
sources.append(doc_data)
7980

80-
# Build Lua GDExtension
8181
if env["platform"] == "ios":
8282
library = env.StaticLibrary(
8383
f"{build_dir}/libluagdextension{env["suffix"]}{env["LIBSUFFIX"]}",

0 commit comments

Comments
 (0)