Renaming directory while installing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Renaming directory while installing

Nathan Huesken-3
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
Reply | Threaded
Open this post in threaded view
|

Re: Renaming directory while installing

David Cole
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 <[hidden email]> 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


_______________________________________________
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