[CMake] Renaming directory while installing

David Cole david.cole at kitware.com
Wed Dec 9 08:27:16 EST 2009


Try this:
INSTALL(DIRECTORY ${SRCDIR}/ DESTINATION destdir/newname)

(note the trailing slash after ${SRCDIR} and the /newname after destdir...)

Let us know if it works... I'm 99% sure that's the way to do it.

Lack of a trailing slash means install this directory, trailing slash means
install everything in this directory.


On Wed, Dec 9, 2009 at 7:21 AM, Nathan Huesken <cmake at lonely-star.org>wrote:

> Hi,
>
> I can install a directory in cmake doing:
>
> INSTALL(DIRECTORY ${SRCDIR} DESTINATION destdir)
>
> which will create a dir under destdir with the name of the source
> directory. Now I want to do this, but name the destination directory
> differently than the original.
>
> Can this be done?
> Thanks!
> Nathan
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091209/2ce1d65c/attachment.htm>


More information about the CMake mailing list