diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake index fcb5d5e..c1d6ccf 100644 --- a/cmake/libutils.cmake +++ b/cmake/libutils.cmake @@ -183,7 +183,7 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE) IF(OSLIBS) LIST(REMOVE_DUPLICATES OSLIBS) - TARGET_LINK_LIBRARIES(${TARGET} ${OSLIBS}) + TARGET_LINK_LIBRARIES(${TARGET} PUBLIC ${OSLIBS}) MESSAGE(STATUS "Library ${TARGET} depends on OSLIBS ${OSLIBS}") ENDIF() @@ -255,10 +255,19 @@ MACRO(MERGE_LIBRARIES) SET(LIBS ${ARG_DEFAULT_ARGS}) LIST(REMOVE_AT LIBS 0) IF(ARG_STATIC) + IF(WITH_SSL) + list(REMOVE_ITEM LIBS ${SSL_LIBRARIES}) + endif() IF (NOT ARG_OUTPUT_NAME) SET(ARG_OUTPUT_NAME ${TARGET}) ENDIF() MERGE_STATIC_LIBS(${TARGET} ${ARG_OUTPUT_NAME} "${LIBS}") + if(WITH_SSL) + target_link_libraries(${TARGET} PUBLIC ${SSL_LIBRARIES}) + if(NOT WIN32) + target_link_libraries(${TARGET} PUBLIC pthread) + endif() + endif() ELSEIF(ARG_SHARED OR ARG_MODULE) IF(ARG_SHARED) SET(LIBTYPE SHARED) diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake index 19ac9a6..78c3131 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@ -152,10 +152,10 @@ MACRO (MYSQL_CHECK_SSL) MESSAGE(STATUS "suffixes <${CMAKE_FIND_LIBRARY_SUFFIXES}>") ENDIF() FIND_LIBRARY(OPENSSL_LIBRARY - NAMES ssl ssleay32 ssleay32MD + NAMES ssl ssleay32 ssleay32MD libssl HINTS ${OPENSSL_ROOT_DIR}/lib) FIND_LIBRARY(CRYPTO_LIBRARY - NAMES crypto libeay32 + NAMES crypto libeay32 libcrypto HINTS ${OPENSSL_ROOT_DIR}/lib) IF (WITH_SSL_PATH) LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) @@ -207,6 +207,7 @@ MACRO (MYSQL_CHECK_SSL) ENDIF() ENDIF() + MESSAGE(STATUS "OPENSSL_ROOT_DIR = ${OPENSSL_ROOT_DIR}") MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}") MESSAGE(STATUS "OPENSSL_LIBRARY = ${OPENSSL_LIBRARY}") MESSAGE(STATUS "CRYPTO_LIBRARY = ${CRYPTO_LIBRARY}") diff --git a/vio/viossl.c b/vio/viossl.c index 5622cb7..bec3acf 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -407,7 +407,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, sk_SSL_COMP_zero(SSL_COMP_get_compression_methods()); #endif -#if !defined(HAVE_YASSL) && !defined(DBUG_OFF) +#if 0 // !defined(HAVE_YASSL) && !defined(DBUG_OFF) { STACK_OF(SSL_COMP) *ssl_comp_methods = NULL; ssl_comp_methods = SSL_COMP_get_compression_methods();