ports/databases/mysql81-server/files/patch-libmysql_CMakeLists.txt
Jochen Neumeister 7e5dafecce add databases/mysql81-server and databases/mysql81-client
Welcome MySQL81 to the Port Tree

Special thanks for help: fluffy, both
Sponsored by:	Netzkommune GmbH
2023-12-18 07:54:41 +01:00

68 lines
2.1 KiB
Text

--- libmysql/CMakeLists.txt.orig 2023-06-21 07:52:10 UTC
+++ libmysql/CMakeLists.txt
@@ -206,6 +206,11 @@ ENDIF()
)
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.
@@ -282,8 +287,15 @@ ENDIF()
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)
@@ -299,6 +311,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)
@@ -345,17 +358,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)