mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #52149 - packaging differences in CMake build
Corrected some packaging bugs: - install mysqlservices library - install libmysqlclient_r.so.{16,16.0.0} as links to libmysqlclient.so - install libmysqld-debug.a - install my_safe_process, my_safe_kill and symlinks to mysql-test-run.pl (mtr, mysql-test-run) into correct place ${INSTALL_MYSQLTESTDIR} cmake/install_layout.cmake: Fix typo cmake/install_macros.cmake: Refactor INSTALL_SYMLINK to allow arbitrary symlink paths. Old version of this macro would make link extension the same as in target. This was not sufficient in some scenarios (would not allow for example libmysqlclient_r.so.16=>./libmysqlclient.so link) libmysql/CMakeLists.txt: Install extra symlinks to libmysqlclient.so (libmysqlclient_r.so.16 and libmysqlclient_r.so.16.0.0) for backward compatiblity. libmysqld/CMakeLists.txt: install libmysqld-debug.a libservices/CMakeLists.txt: install mysqlservices library mysql-test/lib/My/SafeProcess/CMakeLists.txt: install my_safe_process, my_safe_kill into correct place
This commit is contained in:
@ -111,7 +111,7 @@ ENDIF()
|
||||
|
||||
# Clear cached variables if install layout was changed
|
||||
IF(OLD_INSTALL_LAYOUT)
|
||||
IF(NOT OLD_INSTALL_LAYOUT STREQUAL INSTALL_LAYOUR)
|
||||
IF(NOT OLD_INSTALL_LAYOUT STREQUAL INSTALL_LAYOUT)
|
||||
SET(FORCE FORCE)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
@ -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}"
|
||||
|
Reference in New Issue
Block a user