blob: aedf0137861a6a9d546553349a8949361bfb5250 (
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
|
--- libmysql/CMakeLists.txt.orig 2024-04-10 06:26:28 UTC
+++ libmysql/CMakeLists.txt
@@ -214,6 +214,11 @@ ENDIF()
../sql-common/mysql_native_authentication_client.cc)
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.
@@ -308,10 +313,18 @@ ADD_SUBDIRECTORY(fido_client)
ADD_SUBDIRECTORY(fido_client)
# Merge several convenience libraries into one big mysqlclient
+IF(WITHOUT_CLIENTLIBS)
MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE}
COMPONENT Development
LINK_LIBRARIES ${LIBS_TO_LINK}
+ SKIP_INSTALL
)
+ELSE()
+MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE}
+ COMPONENT Development
+ LINK_LIBRARIES ${LIBS_TO_LINK}
+ )
+ENDIF()
# Visual Studio users need debug static library for debug projects
IF(MSVC)
@@ -358,6 +371,7 @@ 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}
@@ -365,11 +379,21 @@ MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE}
${CLIENT_API_NONBLOCKING_FUNCTIONS}
COMPONENT SharedLibraries
LINK_LIBRARIES ${LIBS_TO_LINK}
+ SKIP_INSTALL
+ )
+ELSE()
+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()
# Downgrade warning for strncat in my_crypt_genhash.
IF((WITH_LTO OR CMAKE_COMPILER_FLAG_WITH_LTO) AND MY_COMPILER_IS_GNU)
MY_TARGET_LINK_OPTIONS(libmysql "-Wno-error=stringop-truncation")
|