@@ -116,6 +116,8 @@ function(
116
116
DEPENDS ${godot-cpp_SOURCE_DIR}/binding_generator.py
117
117
COMMENT "Generating bindings"
118
118
)
119
+ add_custom_target (generate_bindings DEPENDS ${GENERATED_FILES_LIST} )
120
+ set_target_properties (generate_bindings PROPERTIES FOLDER "godot-cpp" )
119
121
endfunction ()
120
122
121
123
#[[ Generate doc_data.cpp
@@ -145,19 +147,19 @@ function(generate_doc_source OUTPUT_PATH SOURCES)
145
147
COMMAND "${Python3_EXECUTABLE} " "-c" "${PYTHON_SCRIPT} "
146
148
VERBATIM
147
149
WORKING_DIRECTORY "${godot-cpp_SOURCE_DIR}"
148
- DEPENDS
149
150
DEPENDS #
150
151
"${godot-cpp_SOURCE_DIR}/doc_source_generator.py"
151
152
"${SOURCES} "
152
153
COMMENT "Generating: ${OUTPUT_PATH} "
153
154
)
155
+ add_custom_target (generate_doc_source DEPENDS "${OUTPUT_PATH} " )
156
+ set_target_properties (generate_doc_source PROPERTIES FOLDER "godot-cpp" )
154
157
endfunction ()
155
158
156
159
#[[ target_doc_sources
157
160
A simpler interface to add xml files as doc source to a output target.
158
161
TARGET: 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.]]
161
163
function (target_doc_sources TARGET SOURCES )
162
164
# set the generated file name
163
165
set (DOC_SOURCE_FILE "${CMAKE_CURRENT_BINARY_DIR} /gen/doc_source.cpp" )
@@ -169,11 +171,6 @@ function(target_doc_sources TARGET SOURCES)
169
171
# Add DOC_SOURCE_FILE as a dependency to TARGET
170
172
target_sources (${TARGET} PRIVATE "${DOC_SOURCE_FILE} " )
171
173
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 )
179
176
endfunction ()
0 commit comments