Commit f462fbac authored by Sergei Golubchik's avatar Sergei Golubchik

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
parent 6be05ceb
......@@ -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}
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment