diff options
Diffstat (limited to 'cmake/install_macros.cmake')
-rw-r--r-- | cmake/install_macros.cmake | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index 2318e9d5dea..ac2e952c768 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -1,5 +1,5 @@ # Copyright (c) 2009, 2011, 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 # the Free Software Foundation; version 2 of the License. @@ -11,7 +11,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA INCLUDE(CMakeParseArguments) @@ -23,7 +23,7 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS) "" ${ARGN} ) - + IF(NOT ARG_COMPONENT) SET(ARG_COMPONENT DebugBinaries) ENDIF() @@ -51,7 +51,7 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS) ENDFUNCTION() # Installs manpage for given file (either script or executable) -# +# FUNCTION(INSTALL_MANPAGE file) IF(NOT UNIX) RETURN() @@ -64,7 +64,7 @@ FUNCTION(INSTALL_MANPAGE file) ${CMAKE_BINARY_DIR}/man/*${file}man.8* ) IF(MYSQL_DOC_DIR) - SET(GLOB_EXPR + SET(GLOB_EXPR ${MYSQL_DOC_DIR}/man/*${file}man.1* ${MYSQL_DOC_DIR}/man/*${file}man.8* ${MYSQL_DOC_DIR}/man/*${file}.1* @@ -72,7 +72,7 @@ FUNCTION(INSTALL_MANPAGE file) ${GLOB_EXPR} ) ENDIF() - + FILE(GLOB_RECURSE MANPAGES ${GLOB_EXPR}) IF(MANPAGES) @@ -96,7 +96,7 @@ FUNCTION(INSTALL_SCRIPT) "" ${ARGN} ) - + SET(script ${ARG_UNPARSED_ARGUMENTS}) IF(NOT ARG_DESTINATION) SET(ARG_DESTINATION ${INSTALL_BINDIR}) @@ -109,8 +109,6 @@ FUNCTION(INSTALL_SCRIPT) INSTALL(PROGRAMS ${script} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP}) get_filename_component(dest "${script}" NAME) - CREATE_MARIADB_SYMLINK(${dest} ${ARG_DESTINATION} ${COMP}) - INSTALL_MANPAGE(${dest}) ENDFUNCTION() @@ -148,7 +146,7 @@ FUNCTION(INSTALL_DOCUMENTATION) ENDFUNCTION() -# Install symbolic link to CMake target. +# Install symbolic link to CMake target. # the link is created in the current build directory # and extension will be the same as for target file. MACRO(INSTALL_SYMLINK linkname target destination component) @@ -157,19 +155,19 @@ IF(UNIX) ADD_CUSTOM_COMMAND( OUTPUT ${output} COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${linkname} - COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink + COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink $<TARGET_FILE_NAME:${target}> ${linkname} DEPENDS ${target} ) - + ADD_CUSTOM_TARGET(symlink_${linkname} ALL DEPENDS ${output}) 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}" + STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" output ${output}) ENDIF() INSTALL(FILES ${output} DESTINATION ${destination} COMPONENT ${component}) @@ -180,16 +178,16 @@ IF(WIN32) OPTION(SIGNCODE "Sign executables and dlls with digital certificate" OFF) MARK_AS_ADVANCED(SIGNCODE) IF(SIGNCODE) - SET(SIGNTOOL_PARAMETERS + SET(SIGNTOOL_PARAMETERS /a /t http://timestamp.verisign.com/scripts/timstamp.dll CACHE STRING "parameters for signtool (list)") - FIND_PROGRAM(SIGNTOOL_EXECUTABLE signtool + FIND_PROGRAM(SIGNTOOL_EXECUTABLE signtool PATHS "$ENV{ProgramFiles}/Microsoft SDKs/Windows/v7.0A/bin" "$ENV{ProgramFiles}/Windows Kits/8.0/bin/x86" "$ENV{ProgramFiles}/Windows Kits/8.1/bin/x86" ) IF(NOT SIGNTOOL_EXECUTABLE) - MESSAGE(FATAL_ERROR + MESSAGE(FATAL_ERROR "signtool is not found. Signing executables not possible") ENDIF() MARK_AS_ADVANCED(SIGNTOOL_EXECUTABLE SIGNTOOL_PARAMETERS) @@ -207,7 +205,7 @@ FUNCTION(SIGN_TARGET target) ENDIF() # Mark executable for signing by creating empty *.signme file # The actual signing happens in preinstall step - # (which traverses + # (which traverses ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E touch "$<TARGET_FILE:${target}>.signme" ) @@ -229,7 +227,7 @@ FUNCTION(MYSQL_INSTALL_TARGETS) ELSE() MESSAGE(FATAL_ERROR "COMPONENT argument required") ENDIF() - + SET(TARGETS ${ARG_UNPARSED_ARGUMENTS}) IF(NOT TARGETS) MESSAGE(FATAL_ERROR "Need target list for MYSQL_INSTALL_TARGETS") @@ -254,13 +252,12 @@ FUNCTION(MYSQL_INSTALL_TARGETS) ENDFUNCTION() -# Optionally install mysqld/client/embedded from debug build run. outside of the current build dir -# (unless multi-config generator is used like Visual Studio or Xcode). +# Optionally install mysqld/client/embedded from debug build run. outside of the current build dir +# (unless multi-config generator is used like Visual Studio or Xcode). # For Makefile generators we default Debug build directory to ${buildroot}/../debug. GET_FILENAME_COMPONENT(BINARY_PARENTDIR ${CMAKE_BINARY_DIR} PATH) SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug build") - FUNCTION(INSTALL_MYSQL_TEST from to) IF(INSTALL_MYSQLTESTDIR) INSTALL( |