diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 7 |
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`.") |