From 8ab4177b03c904aa9b518f112b282177cea8eb88 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Tue, 4 Feb 2014 15:34:36 +0100 Subject: Bug#18123048 ENABLE BUILD OF SHARED LIBMYSQLD ON LINUX Added a new option: WITH_EMBEDDED_SHARED_LIBRARY --- libmysqld/CMakeLists.txt | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'libmysqld') diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index eaf14b8a65a..f31aa819ed5 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 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 @@ -143,3 +143,37 @@ IF(MSVC AND NOT DISABLE_SHARED) MERGE_LIBRARIES(libmysqld SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} COMPONENT Embedded) ENDIF() + +OPTION(WITH_EMBEDDED_SHARED_LIBRARY + "Generate shared version of embedded library (in addition to the static one)" + OFF) +IF(WITH_EMBEDDED_SHARED_LIBRARY) + MERGE_LIBRARIES(libmysqld SHARED + mysqlserver + EXPORTS ${CLIENT_API_FUNCTIONS} + OUTPUT_NAME "mysqld" + COMPONENT Embedded) + SET_TARGET_PROPERTIES(libmysqld PROPERTIES + VERSION "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.0" + SOVERSION "${SHARED_LIB_MAJOR_VERSION}" + ) + + GET_TARGET_PROPERTY(libmysqld_link_flags libmysqld LINK_FLAGS) + IF(NOT libmysqld_link_flag) + SET(libmysqld_link_flags) + ENDIF() + SET(libmysqld_link_flags + "${CMAKE_SHARED_LIBRARY_C_FLAGS} ${libmysqld_link_flags}") + SET_TARGET_PROPERTIES(libmysqld + PROPERTIES LINK_FLAGS "${libmysqld_link_flags}") + + IF(LINK_FLAG_NO_UNDEFINED) + SET(libmysqld_link_flags + "${libmysqld_link_flags} ${LINK_FLAG_NO_UNDEFINED}") + SET_TARGET_PROPERTIES(libmysqld + PROPERTIES LINK_FLAGS "${libmysqld_link_flags}") + ENDIF() + + SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1) + SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1) +ENDIF() -- cgit v1.2.1 From 075a2fb716e6e0ffe5078f2433a5c2bdd0e63a3f Mon Sep 17 00:00:00 2001 From: Murthy Narkedimilli Date: Mon, 17 Feb 2014 18:19:04 +0530 Subject: Updated/added copyright header. Added line "use is subject to license terms" to copyright header. --- libmysqld/examples/test-run | 1 + 1 file changed, 1 insertion(+) (limited to 'libmysqld') diff --git a/libmysqld/examples/test-run b/libmysqld/examples/test-run index 9db0f20cb82..3b1cff2ddd8 100755 --- a/libmysqld/examples/test-run +++ b/libmysqld/examples/test-run @@ -1,6 +1,7 @@ #! /bin/sh # Copyright (C) 2001, 2006 MySQL AB +# Use is subject to license terms # # 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 -- cgit v1.2.1