Here is the solution I ended up:
foreach (_file ${DATA_TO_COPY})
add_custom_command (
TARGET your_target
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/path_to_data/${_file}
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${_file}
)
endforeach()
--
View this message in context:
http://cmake.3232098.n2.nabble.com/Copying-Files-into-build-dir-under-Visual-Studio-vs-Codeblocks-Win32-vs-Codeblocks-Linux-tp7271857p7466283.html
Sent from the CMake mailing list archive at Nabble.com.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake