[CMake] Copying directory from source tree to binary tree

Adolfo Rodríguez dofo79 at gmail.com
Mon Mar 30 10:59:06 EDT 2009


I would use execute_process and call cmake -E. If you want a deep copy, you
can use the copy_directory command. Even better, you could create a symlink
(if your platform supports it) with the create_symlink command. The latter
can be achieved like this:

execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_SOURCE_DIR}/path/to/www

${CMAKE_BINARY_DIR}/path/to/www)

Hope this helps!

On Mon, Mar 30, 2009 at 4:42 PM, Bian Jiang <borderj at gmail.com> wrote:

> Copying directory from source tree to binary tree. For example: How to copy
> www to bin folder.
>
> work
> ├─bin
> └─src
>     ├─doing
>     │  └─www
>     ├─include
>     └─lib
>
> Thanks.
>
> --
> Bian Jiang
> Blog:  http://www.wifihack.net/
>
>
> _______________________________________________
> 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/20090330/d83db1f7/attachment.htm>


More information about the CMake mailing list