diff options
Diffstat (limited to 'cmake/ssl.cmake')
-rw-r--r-- | cmake/ssl.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake index b00250cf367..2ec370404df 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@ -128,6 +128,7 @@ MACRO (MYSQL_CHECK_SSL) FIND_PACKAGE(OpenSSL) IF(OPENSSL_FOUND) SET(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY}) + INCLUDE(CheckSymbolExists) SET(SSL_SOURCES "") SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY}) IF(CMAKE_SYSTEM_NAME MATCHES "SunOS") @@ -146,6 +147,7 @@ MACRO (MYSQL_CHECK_SSL) SET(SSL_INTERNAL_INCLUDE_DIRS "") SET(SSL_DEFINES "-DHAVE_OPENSSL") + SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) SET(CMAKE_REQUIRED_LIBRARIES ${SSL_LIBRARIES}) CHECK_SYMBOL_EXISTS(ERR_remove_thread_state "openssl/err.h" HAVE_ERR_remove_thread_state) @@ -153,6 +155,8 @@ MACRO (MYSQL_CHECK_SSL) HAVE_EncryptAes128Ctr) CHECK_SYMBOL_EXISTS(EVP_aes_128_gcm "openssl/evp.h" HAVE_EncryptAes128Gcm) + SET(CMAKE_REQUIRED_INCLUDES) + SET(CMAKE_REQUIRED_LIBRARIES) ELSE() IF(WITH_SSL STREQUAL "system") MESSAGE(FATAL_ERROR "Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to enable SSL support") |