I'm using CMake in the CLion IDE, and in my CMakeLists.txt I use the following command in order to copy some resource files into the binary directory:
file(COPY ${CMAKE_SOURCE_DIR}/res DESTINATION ${CMAKE_BINARY_DIR})
This works whenever my CMake project is reloaded in CLion. However, whenever I just try to build, the files aren't copied again. How do I fix this? Am I using the wrong command?