diff options
author | Rasmus Johansson <rasmus@mariadb.com> | 2020-03-20 16:41:54 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-03-21 20:20:29 +0100 |
commit | 9e1b3af4a490d6fb6704756aba90281ff5ac033a (patch) | |
tree | 513967006d4809562e38a04ae741916c2c32e119 /sql | |
parent | 6fb59d525b7047c82e350d2b721bffc50431eb12 (diff) | |
download | mariadb-git-9e1b3af4a490d6fb6704756aba90281ff5ac033a.tar.gz |
MDEV-21303 Make executables MariaDB named
To change all executables to have a mariadb name I had to:
- Do name changes in every CMakeLists.txt that produces executables
- CREATE_MARIADB_SYMLINK was removed and GET_SYMLINK added by Wlad to reuse the function in other places also
- The scripts/CMakeLists.txt could make use of GET_SYMLINK instead of introducing redundant code, but I thought I'll leave that for next release
- A lot of changes to debian/.install and debian/.links files due to swapping of real executable and symlink. I did not however change the name of the manpages, so the real name is still mysql there and mariadb are symlinks.
- The Windows part needed a change now when we made the executables mariadb -named. MSI (and ZIP) do not support symlinks and to not break backward compatibility we had to include mysql named binaries also. Done by Wlad
Diffstat (limited to 'sql')
-rw-r--r-- | sql/CMakeLists.txt | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index d0a3e8a437a..eee5572ca72 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -1,15 +1,15 @@ # Copyright (c) 2006, 2014, Oracle and/or its affiliates. # Copyright (c) 2010, 2018, MariaDB Corporation -# +# # 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. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # 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 @@ -293,56 +293,56 @@ ENDIF() ADD_LIBRARY(sql_builtins STATIC ${CMAKE_CURRENT_BINARY_DIR}/sql_builtin.cc) TARGET_LINK_LIBRARIES(sql_builtins ${MYSQLD_STATIC_PLUGIN_LIBS}) -MYSQL_ADD_EXECUTABLE(mysqld ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server) +MYSQL_ADD_EXECUTABLE(mariadbd ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server) -IF(APPLE) - # Add CoreServices framework since some dloadable plugins may need it - FIND_LIBRARY(CORESERVICES NAMES CoreServices) - IF(CORESERVICES) - TARGET_LINK_LIBRARIES(mysqld LINK_PRIVATE ${CORESERVICES}) - ENDIF() -ENDIF() +IF(APPLE) + # Add CoreServices framework since some dloadable plugins may need it + FIND_LIBRARY(CORESERVICES NAMES CoreServices) + IF(CORESERVICES) + TARGET_LINK_LIBRARIES(mariadbd LINK_PRIVATE ${CORESERVICES}) + ENDIF() +ENDIF() IF(NOT WITHOUT_DYNAMIC_PLUGINS) IF(NOT MSVC) - SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE) + SET_TARGET_PROPERTIES(mariadbd PROPERTIES ENABLE_EXPORTS TRUE) ENDIF() - GET_TARGET_PROPERTY(mysqld_link_flags mysqld LINK_FLAGS) + GET_TARGET_PROPERTY(mysqld_link_flags mariadbd LINK_FLAGS) IF(NOT mysqld_link_flags) SET(mysqld_link_flags) ENDIF() IF (MINGW OR CYGWIN) - SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS "${mysqld_link_flags} -Wl,--export-all-symbols") + SET_TARGET_PROPERTIES(mariadbd PROPERTIES LINK_FLAGS "${mysqld_link_flags} -Wl,--export-all-symbols") ENDIF() IF(MSVC) - SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS "${mysqld_link_flags} \"${MYSQLD_EXP}\"") - ADD_DEPENDENCIES(mysqld gen_mysqld_lib) + SET_TARGET_PROPERTIES(mariadbd PROPERTIES LINK_FLAGS "${mysqld_link_flags} \"${MYSQLD_EXP}\"") + ADD_DEPENDENCIES(mariadbd gen_mysqld_lib) ENDIF() ENDIF(NOT WITHOUT_DYNAMIC_PLUGINS) -TARGET_LINK_LIBRARIES(mysqld LINK_PRIVATE sql sql_builtins) +TARGET_LINK_LIBRARIES(mariadbd LINK_PRIVATE sql sql_builtins) # Provide plugins with minimal set of libraries SET(INTERFACE_LIBS ${LIBRT}) IF(INTERFACE_LIBS) - TARGET_LINK_LIBRARIES(mysqld LINK_PUBLIC ${INTERFACE_LIBS}) + TARGET_LINK_LIBRARIES(mariadbd LINK_PUBLIC ${INTERFACE_LIBS}) ENDIF() # On Solaris, some extra effort is required in order to get dtrace probes # from static libraries -DTRACE_INSTRUMENT_STATIC_LIBS(mysqld +DTRACE_INSTRUMENT_STATIC_LIBS(mariadbd "sql;mysys;mysys_ssl;${MYSQLD_STATIC_PLUGIN_LIBS}") SET(WITH_MYSQLD_LDFLAGS "" CACHE STRING "Additional linker flags for mysqld") MARK_AS_ADVANCED(WITH_MYSQLD_LDFLAGS) IF(WITH_MYSQLD_LDFLAGS) - GET_TARGET_PROPERTY(MYSQLD_LINK_FLAGS mysqld LINK_FLAGS) + GET_TARGET_PROPERTY(MYSQLD_LINK_FLAGS mariadbd LINK_FLAGS) IF(NOT MYSQLD_LINK_FLAGS) SET(MYSQLD_LINK_FLAGS) ENDIF() - SET_TARGET_PROPERTIES(mysqld PROPERTIES LINK_FLAGS + SET_TARGET_PROPERTIES(mariadbd PROPERTIES LINK_FLAGS "${MYSQLD_LINK_FLAGS} ${WITH_MYSQLD_LDFLAGS}") ENDIF() @@ -396,11 +396,11 @@ ADD_CUSTOM_COMMAND( DEPENDS gen_lex_hash ) -MYSQL_ADD_EXECUTABLE(mysql_tzinfo_to_sql tztime.cc COMPONENT Server) -SET_TARGET_PROPERTIES(mysql_tzinfo_to_sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL") -TARGET_LINK_LIBRARIES(mysql_tzinfo_to_sql mysys mysys_ssl) +MYSQL_ADD_EXECUTABLE(mariadb-tzinfo-to-sql tztime.cc COMPONENT Server) +SET_TARGET_PROPERTIES(mariadb-tzinfo-to-sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL") +TARGET_LINK_LIBRARIES(mariadb-tzinfo-to-sql mysys mysys_ssl) -ADD_CUSTOM_TARGET( +ADD_CUSTOM_TARGET( GenServerSource DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h @@ -420,7 +420,7 @@ CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/cmake/make_dist.cmake.in ${CMAKE_BINARY_DIR}/make_dist.cmake @ONLY) -ADD_CUSTOM_TARGET(dist +ADD_CUSTOM_TARGET(dist COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/make_dist.cmake DEPENDS ${CMAKE_BINARY_DIR}/sql/sql_yacc.cc ${CMAKE_BINARY_DIR}/sql/sql_yacc.hh DEPENDS ${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.cc ${CMAKE_BINARY_DIR}/sql/sql_yacc_ora.hh @@ -492,22 +492,22 @@ IF(WIN32) DEPENDS comp_sql ${my_bootstrap_sql} ) - MYSQL_ADD_EXECUTABLE(mysql_install_db + MYSQL_ADD_EXECUTABLE(mariadb-install-db mysql_install_db.cc ${CMAKE_CURRENT_BINARY_DIR}/mysql_bootstrap_sql.c COMPONENT Server ) - SET_TARGET_PROPERTIES(mysql_install_db PROPERTIES COMPILE_FLAGS -DINSTALL_PLUGINDIR=${INSTALL_PLUGINDIR}) - TARGET_LINK_LIBRARIES(mysql_install_db mysys shlwapi) + SET_TARGET_PROPERTIES(mariadb-install-db PROPERTIES COMPILE_FLAGS -DINSTALL_PLUGINDIR=${INSTALL_PLUGINDIR}) + TARGET_LINK_LIBRARIES(mariadb-install-db mysys shlwapi) ADD_LIBRARY(winservice STATIC winservice.c) TARGET_LINK_LIBRARIES(winservice shell32) - MYSQL_ADD_EXECUTABLE(mysql_upgrade_service + MYSQL_ADD_EXECUTABLE(mariadb-upgrade-service mysql_upgrade_service.cc upgrade_conf_file.cc COMPONENT Server) - TARGET_LINK_LIBRARIES(mysql_upgrade_service mysys winservice) + TARGET_LINK_LIBRARIES(mariadb-upgrade-service mysys winservice) ENDIF(WIN32) INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development |