فهرست منبع

Allow detecting when building as a GDExtension

(cherry picked from commit e17c7bf53060c7f1d34246af68b1d103dd8c01f7)
Aaron Franke 1 سال پیش
والد
کامیت
81a72ff06b
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      tools/godotcpp.py

+ 3 - 0
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=["GDEXTENSION"])
+
     # Suffix
     suffix = ".{}.{}".format(env["platform"], env["target"])
     if env.dev_build: