From: Michael Hanke <mih@debian.org>
Subject: Make symlinks to binaries instead of installing copies or hardlinks

"clone install".
This patch is incomplete in the sense that the 'condor' command has clones
in /usr/bin and /usr/sbin, but the symlinks always point to a 'condor' in the
same directory. The author decided to address that with another symlink from
/usr/bin/condor to /usr/sbin/condor, instead of moving to absolute symlink
locations.
Hardlinking at install time does not work as they end up as copies in the
Debian package.
--- a/build/cmake/macros/CloneInstall.cmake
+++ b/build/cmake/macros/CloneInstall.cmake
@@ -34,7 +34,11 @@ MACRO (CLONE_INSTALL _ORIG_TARGET _ORIG_INSTALL _NEWNAMES _INSTALL_LOC )
         else()
             #install (CODE "execute_process(COMMAND cd \${CMAKE_INSTALL_PREFIX} && ${LN} -v -f ${_ORIG_INSTALL}/${_ORIG_TARGET} ${_INSTALL_LOC}/${new_target})")
             # because it's a hardlink absolute paths should not matter.
-	    install (CODE "execute_process(COMMAND ${LN} -v -f \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_ORIG_INSTALL}/${_ORIG_TARGET} \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}/${new_target})")
+	    #install (CODE "execute_process(COMMAND ${LN} -v -f \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_ORIG_INSTALL}/${_ORIG_TARGET} \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}/${new_target})")
+	    # go with symlinks as hardlinks would end up as copyies in the Debian
+	    # package
+	    install (CODE "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${_ORIG_TARGET} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}/${new_target}\")" )
+
         endif()
 
 	endforeach(new_target)
