summaryrefslogtreecommitdiff
blob: df4a55d8dfe0e9b2b242ba3c9d0a5fe45d67e444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
=== modified file 'cmake/libutils.cmake'
--- a/cmake/libutils.cmake	2010-01-26 12:47:34 +0000
+++ b/cmake/libutils.cmake	2010-03-04 21:19:38 +0000
@@ -268,6 +268,16 @@ MACRO(MERGE_LIBRARIES)
     MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
   ENDIF()
   SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_INTERFACE_LIBRARIES "")
+
+  IF(ARG_SHARED AND LINK_FLAG_NO_UNDEFINED)
+    # Do not allow undefined symbols in shared libraries
+    GET_TARGET_PROPERTY(TARGET_LINK_FLAGS ${TARGET} LINK_FLAGS)
+    IF(NOT TARGET_LINK_FLAGS)
+      SET(TARGET_LINK_FLAGS)
+    ENDIF()
+    SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_FLAGS 
+      "${TARGET_LINK_FLAGS} ${LINK_FLAG_NO_UNDEFINED}")
+  ENDIF() 
 ENDMACRO()
 
 FUNCTION(GET_DEPENDEND_OS_LIBS target result)

=== modified file 'libmysqld/CMakeLists.txt'
--- a/libmysqld/CMakeLists.txt	2010-02-20 19:40:03 +0000
+++ b/libmysqld/CMakeLists.txt	2010-03-04 21:19:38 +0000
@@ -138,7 +138,17 @@ IF(MSVC)
   ${CMAKE_STATIC_LIBRARY_PREFIX}mysqld-debug)
 ENDIF()
 
-IF(MSVC AND NOT DISABLE_SHARED)
-  MERGE_LIBRARIES(libmysqld SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS}
-  COMPONENT Embedded)
+IF(NOT DISABLE_SHARED)
+  MERGE_LIBRARIES(libmysqld SHARED mysqlserver EXPORTS ${CLIENT_API_FUNCTIONS})
+  IF(UNIX)
+    # Name the shared library, handle versioning (provides same api as client library
+    # hence the same version)
+    SET_TARGET_PROPERTIES(libmysqld PROPERTIES 
+      OUTPUT_NAME mysqld 
+      VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0" 
+      SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
+    # Clean direct output flags, as 2 targets have the same base name (libmysqld)
+    SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+    SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+  ENDIF()
 ENDIF()