[CMake] INSTALL(DIRECTORY ...) does not preserve symlinks

Brad King brad.king at kitware.com
Fri May 18 08:45:40 EDT 2007


Guilherme Balena Versiani wrote:
> I have a big software distribution with several third-party software
> bundled with it. I use CMake to download these third-party packages,
> unpack, configure and install it temporarily in a CMAKE_BINARY_DIR
> subdir (e.g. ${CMAKE_BINARY_DIR}/dist) -- after this process I compile
> the rest of my software and link it with the bundled libraries. There
> are a lot of symbolic links generated in 'dist' after this process.
> 
> Everything works very well until I do 'make install' or 'make package'.
> As I have so many files to install, I just have used:
> 
>    INSTALL(DIRECTORY ${CMAKE_BINARY_DIR}/dist/x/ DESTINATION x)
> 
> But both the installation and the package have all symbolic links
> removed (substituted by a copy of its targets). There is a way to
> preserve symlinks during the install/package process?

This bug has been reported here:

http://www.cmake.org/Bug/bug.php?op=show&bugid=4384

It's fixed in CVS CMake and is scheduled for merging to the 2.4 release
branch.

-Brad


More information about the CMake mailing list