summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-04-21 22:57:54 +0200
committerSergei Golubchik <serg@mariadb.org>2020-04-27 09:11:29 +0200
commitf462fbac61445558a7b8929cabace8a9c480d961 (patch)
tree3b0d00b1da32f519683d0037456984e8accb8b12 /cmake
parent6be05ceb05609b1aa7382776b4e27ad134808eca (diff)
downloadmariadb-git-f462fbac61445558a7b8929cabace8a9c480d961.tar.gz
MDEV-22078 MariaDB-compat missing from MariaDB 10.4 CentOS 8 Yum Repo
Backport INSALL_SYMLINK cmake macro from 10.3. It'll make libmysqlclient_r.* symlinks to link to the actual shared library file, not to another symlink. As a bonus it'll fix cmake warning about deprecated LOCATION property
Diffstat (limited to 'cmake')
-rw-r--r--cmake/install_macros.cmake10
1 files changed, 3 insertions, 7 deletions
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
index 0c05b06208f..bb89a57ab11 100644
--- a/cmake/install_macros.cmake
+++ b/cmake/install_macros.cmake
@@ -162,17 +162,13 @@ ENDFUNCTION()
# and extension will be the same as for target file.
MACRO(INSTALL_SYMLINK linkname target destination component)
IF(UNIX)
- GET_TARGET_PROPERTY(location ${target} LOCATION)
- GET_FILENAME_COMPONENT(path ${location} PATH)
- GET_FILENAME_COMPONENT(name ${location} NAME)
- SET(output ${path}/${linkname})
+ SET(output ${CMAKE_CURRENT_BINARY_DIR}/${linkname})
ADD_CUSTOM_COMMAND(
OUTPUT ${output}
- COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output}
+ COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${linkname}
COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink
- ${name}
+ $<TARGET_FILE_NAME:${target}>
${linkname}
- WORKING_DIRECTORY ${path}
DEPENDS ${target}
)