I need to create symbolic links to directory common_resources
which contains textures, fonts, 3D models, shaders, and is located in my CMAKE_SOURCE_DIR
. I have to put such a link into all of my compiled binary target's working directories (~50 directories).
I can probably do it one-by-one by adding this ADD_CUSTOM_TARGET
to each subfolder
ADD_CUSTOM_TARGET( common_resources ALL COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/common_resources ${CMAKE_CURRENT_BINARY_DIR}/common_resources )
but I do not want to do it because:
- I don't want to to edit all those
CMakeList.txt
files and - I don't want to create so many custom targets for no reason. I use Code::Blocks IDE and I already have very long list of targets to select from, which makes it difficult to work with.