@@ -116,6 +116,8 @@ function(
116116 DEPENDS ${godot-cpp_SOURCE_DIR}/binding_generator.py
117117 COMMENT "Generating bindings"
118118 )
119+ add_custom_target (generate_bindings DEPENDS ${GENERATED_FILES_LIST} )
120+ set_target_properties (generate_bindings PROPERTIES FOLDER "godot-cpp" )
119121endfunction ()
120122
121123#[[ Generate doc_data.cpp
@@ -145,19 +147,19 @@ function(generate_doc_source OUTPUT_PATH SOURCES)
145147 COMMAND "${Python3_EXECUTABLE} " "-c" "${PYTHON_SCRIPT} "
146148 VERBATIM
147149 WORKING_DIRECTORY "${godot-cpp_SOURCE_DIR}"
148- DEPENDS
149150 DEPENDS #
150151 "${godot-cpp_SOURCE_DIR}/doc_source_generator.py"
151152 "${SOURCES} "
152153 COMMENT "Generating: ${OUTPUT_PATH} "
153154 )
155+ add_custom_target (generate_doc_source DEPENDS "${OUTPUT_PATH} " )
156+ set_target_properties (generate_doc_source PROPERTIES FOLDER "godot-cpp" )
154157endfunction ()
155158
156159#[[ target_doc_sources
157160A simpler interface to add xml files as doc source to a output target.
158161TARGET: The gdexension library target
159- SOURCES: a list of xml files to use for source generation and inclusion.
160- This function also adds a doc_gen target to test source generation.]]
162+ SOURCES: a list of xml files to use for source generation and inclusion.]]
161163function (target_doc_sources TARGET SOURCES )
162164 # set the generated file name
163165 set (DOC_SOURCE_FILE "${CMAKE_CURRENT_BINARY_DIR} /gen/doc_source.cpp" )
@@ -169,11 +171,6 @@ function(target_doc_sources TARGET SOURCES)
169171 # Add DOC_SOURCE_FILE as a dependency to TARGET
170172 target_sources (${TARGET} PRIVATE "${DOC_SOURCE_FILE} " )
171173
172- # Create a dummy target that depends on the source so that users can
173- # test the file generation task.
174- if (TARGET doc_gen)
175- else ()
176- add_custom_target (doc_gen)
177- endif ()
178- target_sources (doc_gen PRIVATE "${DOC_SOURCE_FILE} " )
174+ # Without adding this dependency to the doc_source_generator, XCode will complain.
175+ add_dependencies (${TARGET} generate_doc_source)
179176endfunction ()
0 commit comments