[CMake] Using cmake -E copy_directory with subversion

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Oct 7 05:04:23 EDT 2008


On Tue, Oct 7, 2008 at 5:15 AM, Aurélien Vallée
<vallee.aurelien at gmail.com> wrote:
> 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} )

I would do a FILE(GLOB bla ${CMAKE_HOME_DIRECTORY}/shaders/*.glsl) instead.

2cts
-- 
Mathieu


More information about the CMake mailing list