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

"clone install". The latter causes some weired problems with cmake not
handling RPATH settings properly.
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.
--- a/build/cmake/CloneInstall.cmake
+++ b/build/cmake/CloneInstall.cmake
@@ -26,7 +26,13 @@
 	endif( WINDOWS )
 
 	foreach ( new_target ${_NEWNAMES} )
-		install (CODE "FILE(INSTALL \"${${_ORIG_TARGET}_loc}\" DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}\" USE_SOURCE_PERMISSIONS RENAME \"${new_target}${WIN_EXE_EXT}\")")
+		if (UNIX)
+			# go with symlinks on unix: easier, smaller, works with tricky
+			# RPATH settings
+			install (CODE "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${_ORIG_TARGET} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}/${new_target}\")" )
+		else (UNIX)
+			install (CODE "FILE(INSTALL \"${${_ORIG_TARGET}_loc}\" DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${_INSTALL_LOC}\" USE_SOURCE_PERMISSIONS RENAME \"${new_target}${WIN_EXE_EXT}\")")
+		endif (UNIX)
 	endforeach(new_target)
 
 ENDMACRO (CLONE_INSTALL)
