From f462fbac61445558a7b8929cabace8a9c480d961 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 21 Apr 2020 22:57:54 +0200 Subject: 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 --- cmake/install_macros.cmake | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'cmake') 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} + $ ${linkname} - WORKING_DIRECTORY ${path} DEPENDS ${target} ) -- cgit v1.2.1