ソースを参照

Merge pull request #1339 from aaronfranke/detect-gdext

Allow detecting when building as a GDExtension
David Snopek 1 年間 前
コミット
3f44e9b404
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: