From 49098fbdc71ffe8e3293ee57cdf401e2b06c6c03 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 (cherry picked from commit e17c7bf53060c7f1d34246af68b1d103dd8c01f7) --- tools/godotcpp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/godotcpp.py b/tools/godotcpp.py index 925b214d..4ab18cd3 100644 --- a/tools/godotcpp.py +++ b/tools/godotcpp.py @@ -267,6 +267,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=["GDEXTENSION"]) + # Suffix suffix = ".{}.{}".format(env["platform"], env["target"]) if env.dev_build: