summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-08-09 17:15:17 -0500
committerAaron Franke <arnfranke@yahoo.com>2021-08-09 17:43:48 -0500
commit430ad75963a0e6837ef460e78fb99565714b4418 (patch)
treed5b98ae003fd64fb76a77def411c6a51d97c48ee /SConstruct
parentc68b109f270a2bf1c42c3f083b53e7bc26dadfd6 (diff)
Some work on double support
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct7
1 files changed, 7 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 684abee29f..0224784b9d 100644
--- a/SConstruct
+++ b/SConstruct
@@ -119,6 +119,7 @@ opts.Add(BoolVariable("tools", "Build the tools (a.k.a. the Godot editor)", True
opts.Add(EnumVariable("target", "Compilation target", "debug", ("debug", "release_debug", "release")))
opts.Add("arch", "Platform-dependent architecture (arm/arm64/x86/x64/mips/...)", "")
opts.Add(EnumVariable("bits", "Target platform bits", "default", ("default", "32", "64")))
+opts.Add(EnumVariable("float", "Floating-point precision", "default", ("default", "32", "64")))
opts.Add(EnumVariable("optimize", "Optimization type", "speed", ("speed", "size", "none")))
opts.Add(BoolVariable("production", "Set defaults to build Godot for use in production", False))
opts.Add(BoolVariable("use_lto", "Use link-time optimization", False))
@@ -327,6 +328,9 @@ if env_base["no_editor_splash"]:
if not env_base["deprecated"]:
env_base.Append(CPPDEFINES=["DISABLE_DEPRECATED"])
+if env_base["float"] == "64":
+ env_base.Append(CPPDEFINES=["REAL_T_IS_DOUBLE"])
+
if selected_platform in platform_list:
tmppath = "./platform/" + selected_platform
sys.path.insert(0, tmppath)
@@ -564,6 +568,9 @@ if selected_platform in platform_list:
else:
suffix = "." + selected_platform
+ if env_base["float"] == "64":
+ suffix += ".double"
+
if env["target"] == "release":
if env["tools"]:
print("Error: The editor can only be built with `target=debug` or `target=release_debug`.")