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.
This commit is contained in:
Wayne Stambaugh 2015-10-03 11:40:00 -04:00 committed by Brad King
parent 6b575dec8d
commit 1bf66fed67
1 changed files with 2 additions and 6 deletions

View File

@ -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}