From 9732b8c6d8ed0efce6dfed4aa567ab3defd5c84b Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 17 Dec 2023 11:45:31 -0600 Subject: [PATCH] Allow detecting when building as a GDExtension --- tools/godotcpp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/godotcpp.py b/tools/godotcpp.py index e445cad379..0da12318a7 100644 --- a/tools/godotcpp.py +++ b/tools/godotcpp.py @@ -295,6 +295,9 @@ def generate(env): if env["precision"] == "double": env.Append(CPPDEFINES=["REAL_T_IS_DOUBLE"]) + # Allow detecting when building as a GDExtension. + env.Append(CPPDEFINES=["GODOT_GDEXTENSION"]) + # Suffix suffix = ".{}.{}".format(env["platform"], env["target"]) if env.dev_build: