File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -107,15 +107,16 @@ function(
107107 # Strip newlines and whitespace to make it a one-liner.
108108 string (REGEX REPLACE "\n *" " " PYTHON_SCRIPT "${PYTHON_SCRIPT} " )
109109
110- add_custom_target (
111- generate_bindings
110+ add_custom_command (
111+ OUTPUT ${GENERATED_FILES_LIST}
112112 COMMAND "${Python3_EXECUTABLE} " "-c" "${PYTHON_SCRIPT} "
113- BYPRODUCTS ${GENERATED_FILES_LIST}
113+ MAIN_DEPENDENCY ${GODOTCPP_GDEXTENSION_API_FILE}
114+ DEPENDS ${godot-cpp_SOURCE_DIR}/binding_generator.py
114115 WORKING_DIRECTORY ${godot-cpp_SOURCE_DIR}
115116 COMMENT "Generating bindings"
116117 VERBATIM
117- SOURCES ${godot-cpp_SOURCE_DIR}/binding_generator.py ${GODOTCPP_GDEXTENSION_API_FILE}
118118 )
119+ add_custom_target (generate_bindings DEPENDS ${GENERATED_FILES_LIST} )
119120 set_target_properties (generate_bindings PROPERTIES FOLDER "godot-cpp" )
120121endfunction ()
121122
You can’t perform that action at this time.
0 commit comments