Add double precision build support.

This commit is contained in:
bruvzg
2022-03-20 18:19:27 +02:00
parent f262ae9a6f
commit e06d5cd414
5 changed files with 49 additions and 24 deletions

View File

@@ -139,6 +139,7 @@ opts.Add(
opts.Add(BoolVariable("generate_template_get_node", "Generate a template version of the Node class's get_node.", True))
opts.Add(BoolVariable("build_library", "Build the godot-cpp library.", True))
opts.Add(EnumVariable("float", "Floating-point precision", "32", ("32", "64")))
opts.Update(env)
Help(opts.GenerateHelpText(env))
@@ -171,6 +172,9 @@ else:
if env["target"] == "debug":
env.Append(CPPDEFINES=["DEBUG_ENABLED", "DEBUG_METHODS_ENABLED"])
if env["float"] == "64":
env.Append(CPPDEFINES=["REAL_T_IS_DOUBLE"])
if env["platform"] == "linux" or env["platform"] == "freebsd":
if env["use_llvm"]:
env["CXX"] = "clang++"