IF($ENV{DESTDIR} MATCHES ".+")
    SET(DESTDIR $ENV{DESTDIR})
ELSE($ENV{DESTDIR} MATCHES ".+")
    SET(DESTDIR "")
ENDIF($ENV{DESTDIR} MATCHES ".+")

SET(COMMONLINK "${DESTDIR}${CMAKE_INSTALL_PREFIX}/share/doc/tde/HTML/en/tdesvn/common")

MESSAGE(STATUS "Generating ${COMMONLINK}")

EXECUTE_PROCESS(
    COMMAND "rm" "-f" "common"
    COMMAND ln "-s" "../common" "common"
    WORKING_DIRECTORY "${DESTDIR}/${CMAKE_INSTALL_PREFIX}/share/doc/tde/HTML/en/tdesvn"
    )

SET(CMAKE_INSTALL_MANIFEST_FILES ${CMAKE_INSTALL_MANIFEST_FILES} "${CMAKE_INSTALL_PREFIX}/share/doc/tde/HTML/en/tdesvn/common")

