FindOpenSSL: use SelectLibraryConfigurations

This commit is contained in:
Rolf Eike Beer 2012-07-23 21:00:40 +02:00
parent 4b793ad196
commit 7464519304
1 changed files with 5 additions and 13 deletions

View File

@ -79,7 +79,6 @@ IF(WIN32 AND NOT CYGWIN)
FIND_LIBRARY(LIB_EAY_DEBUG
NAMES
libeay32MDd
libeay32
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
@ -101,8 +100,6 @@ IF(WIN32 AND NOT CYGWIN)
FIND_LIBRARY(SSL_EAY_DEBUG
NAMES
ssleay32MDd
ssleay32
ssl
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
@ -122,16 +119,11 @@ IF(WIN32 AND NOT CYGWIN)
"lib/VC"
)
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
set( OPENSSL_LIBRARIES
optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG}
optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG}
)
else()
set( OPENSSL_LIBRARIES ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} )
endif()
MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE)
MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE)
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
select_library_configurations(LIB_EAY)
select_library_configurations(SSL_EAY)
set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} )
ELSEIF(MINGW)
# same player, for MingW
SET(LIB_EAY_NAMES libeay32)