vcpkg/ports/libmysql/system-libs.patch
双草酸酯 774469f31a
[libmysql] upgrade to 8.0.32 (#30576)
* [libmysql] update to 8.0.32

* update version

* minimize system libs patch

* update version

* fix compilation on macOS with homebrew

* update version

* fix `\n` by mistake

* fix mysql_config

* update version
2023-04-10 19:26:08 -07:00

77 lines
2.7 KiB
Diff

diff --git a/cmake/icu.cmake b/cmake/icu.cmake
index 3ac136dbfb4..c7bdbc8c47e 100644
--- a/cmake/icu.cmake
+++ b/cmake/icu.cmake
@@ -68,6 +68,12 @@ ENDMACRO()
# install_root is either 'system' or is assumed to be a path.
#
MACRO (FIND_ICU install_root)
+ find_package(ICU REQUIRED COMPONENTS uc io dt in)
+ set(ICU_SYSTEM_LIBRARIES ICU::uc ICU::io ICU::dt ICU::in)
+ set(ICU_COMMON_DIR ${ICU_INCLUDE_DIR})
+ SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
+ENDMACRO()
+MACRO (FIND_ICU_OLD install_root)
IF("${install_root}" STREQUAL "system")
SET(EXTRA_FIND_LIB_ARGS)
SET(EXTRA_FIND_INC_ARGS)
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
index ae13a63dfdc..9604ad2fc2a 100644
--- a/cmake/libutils.cmake
+++ b/cmake/libutils.cmake
@@ -441,19 +441,7 @@ MACRO(MERGE_CONVENIENCE_LIBRARIES TARGET_ARG)
# On Windows, ssleay32.lib/libeay32.lib or libssl.lib/libcrypto.lib
# must be merged into mysqlclient.lib
IF(WIN32 AND ${TARGET} STREQUAL "mysqlclient")
- SET(LINKER_EXTRA_FLAGS "")
- FOREACH(LIB ${SSL_LIBRARIES})
- STRING_APPEND(LINKER_EXTRA_FLAGS " ${LIB}")
- ENDFOREACH()
-
- # __NULL_IMPORT_DESCRIPTOR already defined, second definition ignored
- # Same symbol from both libssl and libcrypto
- # But: Lib.exe has no /IGNORE option, see
- # https://docs.microsoft.com/en-us/cpp/build/reference/running-lib?view=msvc-160
- # STRING_APPEND(LINKER_EXTRA_FLAGS " /IGNORE:LNK4006")
-
- SET_TARGET_PROPERTIES(${TARGET}
- PROPERTIES STATIC_LIBRARY_FLAGS "${LINKER_EXTRA_FLAGS}")
+ TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ${SSL_LIBRARIES})
ENDIF()
IF(ARG_LINK_LIBRARIES)
diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake
index e7047412f9b..ffbc95b578d 100644
--- a/cmake/lz4.cmake
+++ b/cmake/lz4.cmake
@@ -46,7 +46,7 @@ MACRO (FIND_SYSTEM_LZ4)
FIND_PATH(LZ4_INCLUDE_DIR
NAMES lz4frame.h)
FIND_LIBRARY(LZ4_SYSTEM_LIBRARY
- NAMES lz4)
+ NAMES lz4d lz4)
IF (LZ4_INCLUDE_DIR AND LZ4_SYSTEM_LIBRARY)
SET(SYSTEM_LZ4_FOUND 1)
SET(LZ4_LIBRARY ${LZ4_SYSTEM_LIBRARY})
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index 52feade..1e71bd7 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -93,7 +93,16 @@ ENDMACRO()
# Provides the following configure options:
# WITH_SSL=[yes|system|<path/to/custom/installation>]
MACRO (MYSQL_CHECK_SSL)
+ find_package(OpenSSL REQUIRED)
+ set(OPENSSL_LIBRARY OpenSSL::SSL CACHE STRING "")
+ set(CRYPTO_LIBRARY OpenSSL::Crypto CACHE STRING "")
+ FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
+ DOC "path to the openssl executable")
+ SET(SSL_DEFINES "-DHAVE_OPENSSL")
+ set(SSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
+ENDMACRO()
+MACRO (MYSQL_CHECK_SSL_OLD)
IF(NOT WITH_SSL)
SET(WITH_SSL "system" CACHE STRING ${WITH_SSL_DOC_STRING} FORCE)
ENDIF()