I wanna using configure_file(<input> <output> COPYONLY) to copy a specific directory files recursive , I used this command:
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/res/* ${CMAKE_CURRENT_BINARY_DIR}/res COPYONLY)
but I got some errors , How I should use this command for this porpuse? (I looked at this question too), the Errors:
CMake Error at CMakeLists.txt:86 (configure_file): configure_file Problem configuring file
I know that I can use it with file(...) too , but I wanna use configure_file(...):
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/res/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/res)
configure_file(emphasis mine): "Copies an<input>file to an<output>file .."file(GLOB)and iterate over this list withforeach.execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/res" "${CMAKE_CURRENT_BINARY_DIR}/res")which does seem to achieve what you seem to attempt here btw...