From 6b575dec8d393c4a38c587ee97afa068eeb4b432 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sat, 3 Oct 2015 11:40:00 -0400 Subject: FindOpenSSL: Tolerate tabs in header while parsing version (#15765) Tolerate tabs instead of spaces in the "# define" line. --- Modules/FindOpenSSL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index a0f4c52..3aea695 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -325,7 +325,7 @@ endfunction() if (OPENSSL_INCLUDE_DIR) if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h") file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str - REGEX "^# *define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*") + REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*") # The version number is encoded as 0xMNNFFPPS: major minor fix patch status # The status gives if this is a developer or prerelease and is ignored here. -- cgit v0.12 From 1bf66fed674bc1b7c463bd230f7c66df8aa86e79 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sat, 3 Oct 2015 11:40:00 -0400 Subject: FindOpenSSL: Search for unix-named libraries first on MinGW (#15765) Generalize the change made by commit v2.8.10~228^2~4 (FindOpenSSL: find cross-compiled OpenSSL from MinGW, 2012-07-23) to be used on builds hosted on Windows too. When building for MinGW, consider library names that come with MinGW before looking for the main Windows distribution of OpenSSL. --- Modules/FindOpenSSL.cmake | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 3aea695..8b4b988 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -200,12 +200,8 @@ if(WIN32 AND NOT CYGWIN) set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} ) elseif(MINGW) # same player, for MinGW - set(LIB_EAY_NAMES libeay32) - set(SSL_EAY_NAMES ssleay32) - if(CMAKE_CROSSCOMPILING) - list(APPEND LIB_EAY_NAMES crypto) - list(APPEND SSL_EAY_NAMES ssl) - endif() + set(LIB_EAY_NAMES crypto libeay32) + set(SSL_EAY_NAMES ssl ssleay32) find_library(LIB_EAY NAMES ${LIB_EAY_NAMES} -- cgit v0.12