소스 검색

Allow detecting when building as a GDExtension

(cherry picked from commit e17c7bf53060c7f1d34246af68b1d103dd8c01f7)
Aaron Franke 1 년 전
부모
커밋
49098fbdc7
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      tools/godotcpp.py

+ 3 - 0
tools/godotcpp.py

@@ -267,6 +267,9 @@ def generate(env):
     if env["precision"] == "double":
     if env["precision"] == "double":
         env.Append(CPPDEFINES=["REAL_T_IS_DOUBLE"])
         env.Append(CPPDEFINES=["REAL_T_IS_DOUBLE"])
 
 
+    # Allow detecting when building as a GDExtension.
+    env.Append(CPPDEFINES=["GDEXTENSION"])
+
     # Suffix
     # Suffix
     suffix = ".{}.{}".format(env["platform"], env["target"])
     suffix = ".{}.{}".format(env["platform"], env["target"])
     if env.dev_build:
     if env.dev_build: