浏览代码

Allow detecting when building as a GDExtension

Aaron Franke 1 年之前
父节点
当前提交
e17c7bf530
共有 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: