[CMake] Using cmake -E copy_directory with subversion

Aurélien Vallée vallee.aurelien at gmail.com
Mon Oct 6 23:15:38 EDT 2008


Hello,
I have come across a problem using CMake with SVN.
I have a src/shaders directory containing files with extension ".glsl". I
need to create a rule to copy these files in my build directory, since my
program will need them at runtime.

For now, i have:
ADD_CUSTOM_TARGET( install_shaders ALL ${CMAKE_COMMAND} -E copy_directory
${CMAKE_HOME_DIRECTORY}/shaders/
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} )

The problem is that _everything_ in src/shaders is copied to the build
directory, including the hidden .svn directory! So now after running a make,
i can't commit anything since SVN complains about having the same
destination URL for src/shaders and the build directory.

I tried to fix it with:
ADD_CUSTOM_TARGET( install_shaders ALL ${CMAKE_COMMAND} -E copy
${CMAKE_HOME_DIRECTORY}/shaders/*.glsl
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} )

But CMake reports an error.

I would really appreciate any possible help,
thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081007/70e6f21b/attachment.htm>


More information about the CMake mailing list