[CMake] Copying directory from source tree to binary tree

Bian Jiang borderj at gmail.com
Mon Mar 30 21:55:38 EDT 2009


Thanks Adolfo:
   It's work fine, I can't create a symlink so use copy_directory.

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

${CMAKE_BINARY_DIR}/path/to/www)


2009/3/30 Adolfo Rodríguez <dofo79 at gmail.com>

> 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090331/3b83fab5/attachment.htm>


More information about the CMake mailing list