Skip to content

Commit 3a7d25e

Browse files
committed
Fix incorrect parsing of custom arguments
1 parent fb18613 commit 3a7d25e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

SConstruct

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@ options: list = [
77
name="FTS5",
88
help="Enable SQLite's FTS5 extension which provides full-test search functionality to database applications",
99
define="SQLITE_ENABLE_FTS5",
10-
default=False,
1110
),
1211
CompileTimeOption(
1312
key="enable_math_functions",
1413
name="MATH_FUNCTIONS",
1514
help="Enable SQLite's Built-in Mathematical SQL Functions",
1615
define="SQLITE_ENABLE_MATH_FUNCTIONS",
17-
default=False,
1816
),
1917
]
2018

2119
target_path = ARGUMENTS.pop("target_path", "demo/addons/godot-sqlite/bin/")
2220
target_name = ARGUMENTS.pop("target_name", "libgdsqlite")
23-
parsed_options = {x.key: ARGUMENTS.pop(x.key, x.default) for x in options}
2421

22+
parsed_options = {x.key: ARGUMENTS.pop(x.key) for x in options if x.key in ARGUMENTS}
2523
env = SConscript("godot-cpp/SConstruct")
24+
ARGUMENTS.update(parsed_options)
2625

2726
env_vars = Variables()
2827
option: CompileTimeOption
@@ -52,7 +51,7 @@ if env["target"] in ["editor", "template_debug"]:
5251

5352
option: CompileTimeOption
5453
for option in options:
55-
if parsed_options[option.key]:
54+
if env[option.key]:
5655
print(f"{option.name} is enabled.")
5756
env.Append(CPPDEFINES=[option.define])
5857
else:

misc/utility/classes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
class CompileTimeOption:
55
key: str
66
name: str
7-
default: bool
87
help: str
98
define: str

0 commit comments

Comments
 (0)