File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1+ MACRO (INSTALL_SYMLINK linktarget linkname destination )
2+ IF (UNIX )
3+ IF (IS_ABSOLUTE ${destination} )
4+ SET (FULL_DESTINATION "\$ ENV{DESTDIR}${destination} /${linkname} " )
5+ ELSE (IS_ABSOLUTE ${destination} )
6+ SET (FULL_DESTINATION "\$ ENV{DESTDIR}${CMAKE_INSTALL_PREFIX} /${destination} /${linkname} " )
7+ ENDIF (IS_ABSOLUTE ${destination} )
8+
9+ INSTALL (CODE "MESSAGE(STATUS \" Symlink: ${FULL_DESTINATION} -> ${linktarget} \" )
10+ EXECUTE_PROCESS(COMMAND \$ {CMAKE_COMMAND} -E create_symlink ${linktarget} ${FULL_DESTINATION} )" )
11+ ENDIF ()
12+ ENDMACRO ()
Original file line number Diff line number Diff line change @@ -166,8 +166,12 @@ ADD_EXECUTABLE(sdl-instead ${INSTEAD_SRCS})
166166TARGET_LINK_LIBRARIES (sdl-instead ${INSTEAD_LIBS} )
167167
168168# install
169+ INCLUDE (InstallSymlink)
170+
169171IF (SYSTEMWIDE)
170172 INSTALL (TARGETS sdl-instead DESTINATION ${BINDIR} )
173+ INSTALL_SYMLINK(sdl-instead instead${CMAKE_EXECUTABLE_SUFFIX} ${BINDIR} )
171174ELSEIF (STANDALONE)
172175 INSTALL (TARGETS sdl-instead DESTINATION ${STANDALONEDIR} )
176+ INSTALL_SYMLINK(sdl-instead instead${CMAKE_EXECUTABLE_SUFFIX} ${STANDALONEDIR} )
173177ENDIF (SYSTEMWIDE)
You can’t perform that action at this time.
0 commit comments