[CMake] How To Copy Media Files Into Out-Of-Source Build

Adolfo Rodríguez dofo79 at gmail.com
Sun Jul 5 11:27:30 EDT 2009


On Sun, Jul 5, 2009 at 5:14 PM, Karol Krizka <kkrizka at gmail.com> wrote:

> Hi there,
>
> Is there a generic way to have CMake copy (or link to) required files
> (ei: movies) into an out-of-source build directory?


If symlinks work for you, you can do:

execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink old new)


If what you really want to do is create a copy, you can change the
'create_symlink' option with 'copy' (for individual files) or
'copy_directory' (for entire directories). However, it looks like for your
use case you can get away with symlinks, if your platform allows them, that
is.

Cheers,

Adolfo



> When I build in an
> out-of-source directory, I would also like to test from the same
> directory without having to take any additional steps.
>
> --
> Cheers,
> Karol Krizka
>
> _______________________________________________
> 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
>



-- 
Adolfo Rodríguez Tsouroukdissian

Robotics engineer
PAL ROBOTICS S.L
http://www.pal-robotics.com
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090705/d7e00186/attachment.htm>


More information about the CMake mailing list