INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${LOCAL_TEST_DIR}
RENAME CTestTestfile.cmake)
+ # Use relative path for symbolic links in order to allow the copy of the directory.
+ # REL_PATH_TO_INSTALL goes to CMAKE_INSTALL_PREFIX from ${CMAKE_INSTALL_PREFIX}/${LOCAL_TEST_DIR}
+ IF(IS_ABSOLUTE ${SALOME_YACS_INSTALL_SAMPLES})
+ SET(SAMPLES_LINK_TARGET ${SALOME_YACS_INSTALL_SAMPLES})
+ ELSE()
+ STRING(REGEX REPLACE [^/]+ ".." REL_PATH_TO_INSTALL ${LOCAL_TEST_DIR})
+ SET(SAMPLES_LINK_TARGET ${REL_PATH_TO_INSTALL}/${SALOME_YACS_INSTALL_SAMPLES})
+ ENDIF()
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
- ${CMAKE_INSTALL_PREFIX}/${SALOME_YACS_INSTALL_SAMPLES}
+ ${SAMPLES_LINK_TARGET}
${CMAKE_INSTALL_PREFIX}/${LOCAL_TEST_DIR}/samples )" )
ENDIF()