瀏覽代碼

Merge pull request #1720 from enetheru/generator_target

CMake: Add generate_bindings custom target
David Snopek 5 月之前
父節點
當前提交
c8c25cd312
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      cmake/godotcpp.cmake

+ 3 - 0
cmake/godotcpp.cmake

@@ -252,6 +252,9 @@ function( godotcpp_generate )
             "${GODOT_PRECISION}"
             "${GODOT_PRECISION}"
             "${CMAKE_CURRENT_BINARY_DIR}" )
             "${CMAKE_CURRENT_BINARY_DIR}" )
 
 
+    add_custom_target( godot-cpp.generate_bindings DEPENDS ${GENERATED_FILES_LIST} )
+    set_target_properties( godot-cpp.generate_bindings PROPERTIES FOLDER "godot-cpp" )
+
     ### Platform is derived from the toolchain target
     ### Platform is derived from the toolchain target
     # See GeneratorExpressions PLATFORM_ID and CMAKE_SYSTEM_NAME
     # See GeneratorExpressions PLATFORM_ID and CMAKE_SYSTEM_NAME
     string( CONCAT SYSTEM_NAME
     string( CONCAT SYSTEM_NAME