File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -192,11 +192,20 @@ function(add_swift_target target)
192
192
COMMAND
193
193
${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR} /${target}/${resources_dir} )
194
194
foreach (resource ${AST_RESOURCES} )
195
- add_custom_command (TARGET
196
- ${target}
197
- POST_BUILD
198
- COMMAND
199
- ${CMAKE_COMMAND} -E copy ${resource} ${CMAKE_CURRENT_BINARY_DIR} /${target}/${resources_dir}/ )
195
+ if (IS_DIRECTORY ${resource} )
196
+ get_filename_component (resource_basename ${resource} NAME )
197
+ add_custom_command (TARGET
198
+ ${target}
199
+ POST_BUILD
200
+ COMMAND
201
+ ${CMAKE_COMMAND} -E copy_directory ${resource} ${CMAKE_CURRENT_BINARY_DIR} /${target}/${resources_dir}/${resource_basename} )
202
+ else ()
203
+ add_custom_command (TARGET
204
+ ${target}
205
+ POST_BUILD
206
+ COMMAND
207
+ ${CMAKE_COMMAND} -E copy ${resource} ${CMAKE_CURRENT_BINARY_DIR} /${target}/${resources_dir}/ )
208
+ endif ()
200
209
endforeach ()
201
210
else ()
202
211
add_custom_command (TARGET
You can’t perform that action at this time.
0 commit comments