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