diff options
author | Jonathan Perkin <jonathan.perkin@oracle.com> | 2010-03-31 11:40:02 +0200 |
---|---|---|
committer | Jonathan Perkin <jonathan.perkin@oracle.com> | 2010-03-31 11:40:02 +0200 |
commit | 7ef2f9fa51b0f6979c4c06e5ce89bf544deefb6f (patch) | |
tree | 6f752ddec7cfac393291ffdecb85dcece13a0a16 /cmake/install_macros.cmake | |
parent | 089ff3dfa94fce7f41378180e494811cf8c9fc13 (diff) | |
download | mariadb-git-7ef2f9fa51b0f6979c4c06e5ce89bf544deefb6f.tar.gz |
Apply wlad fixes from mysql-next-mr-bugfixing
Diffstat (limited to 'cmake/install_macros.cmake')
-rw-r--r-- | cmake/install_macros.cmake | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index 5be9149b92f..f049776b8f4 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -43,27 +43,26 @@ ENDMACRO() # Install symbolic link to CMake target. # the link is created in the same directory as target # and extension will be the same as for target file. -MACRO(INSTALL_SYMLINK linkbasename target destination) +MACRO(INSTALL_SYMLINK linkname target destination) IF(UNIX) GET_TARGET_PROPERTY(location ${target} LOCATION) GET_FILENAME_COMPONENT(path ${location} PATH) - GET_FILENAME_COMPONENT(name_we ${location} NAME_WE) - GET_FILENAME_COMPONENT(ext ${location} EXT) - SET(output ${path}/${linkbasename}${ext}) + GET_FILENAME_COMPONENT(name ${location} NAME) + SET(output ${path}/${linkname}) ADD_CUSTOM_COMMAND( OUTPUT ${output} COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output} COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink - ${name_we}${ext} - ${linkbasename}${ext} + ${name} + ${linkname} WORKING_DIRECTORY ${path} DEPENDS ${target} ) - ADD_CUSTOM_TARGET(symlink_${linkbasename}${ext} + ADD_CUSTOM_TARGET(symlink_${linkname} ALL DEPENDS ${output}) - SET_TARGET_PROPERTIES(symlink_${linkbasename}${ext} PROPERTIES CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1) IF(CMAKE_GENERATOR MATCHES "Xcode") # For Xcode, replace project config with install config STRING(REPLACE "${CMAKE_CFG_INTDIR}" |