blob: 44e1979f807559a61f8a6a0444e5ab9f469cfaab (
plain) (
blame)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
--- libmysql/CMakeLists.txt.orig 2021-12-17 16:07:27 UTC
+++ libmysql/CMakeLists.txt
@@ -198,6 +198,11 @@ IF (WIN32 AND OPENSSL_APPLINK_C)
)
ENDIF()
+INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
+IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ ADD_COMPILE_FLAGS(${CLIENT_SOURCES} COMPILE_FLAGS "-fPIC")
+ENDIF()
+
#
# Include protocol tracing infrastructure and the test
# trace plugin if enabled by build options.
@@ -271,8 +276,15 @@ IF(WIN32)
LIST(APPEND LIBS_TO_MERGE auth_win_client)
ENDIF()
-# LDAP authentication SASL client plug-in
-ADD_SUBDIRECTORY(authentication_ldap)
+IF(WITHOUT_CLIENTLIBS)
+ # Merge several convenience libraries into one big mysqlclient
+ MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE}
+ COMPONENT Development
+ SKIP_INSTALL)
+ELSE(WITHOUT_CLIENTLIBS)
+ # LDAP authentication SASL client plugin
+ MESSAGE(STATUS "Creating LDAP authentication SASL client library.")
+ ADD_SUBDIRECTORY(authentication_ldap)
# FIDO authentication client plugin
ADD_SUBDIRECTORY(authentication_fido)
@@ -288,6 +300,7 @@ MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERG
COMPONENT Development
LINK_LIBRARIES ${LIBS_TO_LINK}
)
+ENDIF(WITHOUT_CLIENTLIBS)
# Visual Studio users need debug static library for debug projects
IF(MSVC)
@@ -334,17 +347,27 @@ ENDIF()
# Merge several convenience libraries into one big mysqlclient
# and link them together into shared library.
+IF(WITHOUT_CLIENTLIBS)
MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE}
EXPORTS
${CLIENT_API_FUNCTIONS}
${CLIENT_API_FUNCTIONS_UNDOCUMENTED}
${CLIENT_API_NONBLOCKING_FUNCTIONS}
COMPONENT SharedLibraries
+ SKIP_INSTALL )
+ELSE(WITHOUT_CLIENTLIBS)
+MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE}
+ EXPORTS
+ ${CLIENT_API_FUNCTIONS}
+ ${CLIENT_API_FUNCTIONS_UNDOCUMENTED}
+ ${CLIENT_API_NONBLOCKING_FUNCTIONS}
+ COMPONENT SharedLibraries
LINK_LIBRARIES ${LIBS_TO_LINK}
${UNIX_OUTPUT_NAME}
${UNIX_SOVERSION}
${UNIX_VERSION}
)
+ENDIF(WITHOUT_CLIENTLIBS)
# Downgrade warning for strncat in my_crypt_genhash.
IF((WITH_LTO OR CMAKE_COMPILER_FLAG_WITH_LTO) AND MY_COMPILER_IS_GNU)
|