From e613d2ed00bc2a188510e9093c791ce87932cc6d Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Thu, 23 Jan 2014 09:02:47 +0100 Subject: Backport of Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18 Backported only the softlink part of the patch, *not* the bumping of library version. With this patch, the libmysql/ directory contains: libmysqlclient.a libmysqlclient_r.a -> libmysqlclient.a libmysqlclient_r.so -> libmysqlclient.so* libmysqlclient_r.so.18 -> libmysqlclient.so.18* libmysqlclient_r.so.18.0.0 -> libmysqlclient.so.18.0.0* libmysqlclient.so -> libmysqlclient.so.18* libmysqlclient.so.18 -> libmysqlclient.so.18.0.0* libmysqlclient.so.18.0.0* --- cmake/install_macros.cmake | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'cmake/install_macros.cmake') diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index 35cd53aafd6..54f3225ed7e 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -111,28 +111,28 @@ FUNCTION(INSTALL_SCRIPT) ENDFUNCTION() # 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 linkname target destination component) +# We do 'cd path; ln -s target_name link_name' +# We also add an INSTALL target for "${path}/${link_name}" +MACRO(INSTALL_SYMLINK target target_name link_name 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 ${path}/${link_name}) ADD_CUSTOM_COMMAND( OUTPUT ${output} COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output} COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink - ${name} - ${linkname} + ${target_name} + ${link_name} WORKING_DIRECTORY ${path} DEPENDS ${target} ) - ADD_CUSTOM_TARGET(symlink_${linkname} + ADD_CUSTOM_TARGET(symlink_${link_name} ALL DEPENDS ${output}) - SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(symlink_${link_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1) IF(CMAKE_GENERATOR MATCHES "Xcode") # For Xcode, replace project config with install config STRING(REPLACE "${CMAKE_CFG_INTDIR}" -- cgit v1.2.1