FindOpenSSL: De-duplicate find_library path suffixes on Windows
Store the path suffixes in a variable and reference it in each find_library call.
This commit is contained in:
parent
4c10461a87
commit
fbcbf7f29d
|
@ -99,15 +99,20 @@ if(WIN32 AND NOT CYGWIN)
|
||||||
# We are using the libraries located in the VC subdir instead of the parent directory eventhough :
|
# We are using the libraries located in the VC subdir instead of the parent directory eventhough :
|
||||||
# libeay32MD.lib is identical to ../libeay32.lib, and
|
# libeay32MD.lib is identical to ../libeay32.lib, and
|
||||||
# ssleay32MD.lib is identical to ../ssleay32.lib
|
# ssleay32MD.lib is identical to ../ssleay32.lib
|
||||||
|
|
||||||
|
set(_OPENSSL_PATH_SUFFIXES
|
||||||
|
"lib"
|
||||||
|
"VC"
|
||||||
|
"lib/VC"
|
||||||
|
)
|
||||||
|
|
||||||
find_library(LIB_EAY_DEBUG
|
find_library(LIB_EAY_DEBUG
|
||||||
NAMES
|
NAMES
|
||||||
libeay32MDd
|
libeay32MDd
|
||||||
libeay32d
|
libeay32d
|
||||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
"lib"
|
${_OPENSSL_PATH_SUFFIXES}
|
||||||
"VC"
|
|
||||||
"lib/VC"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(LIB_EAY_RELEASE
|
find_library(LIB_EAY_RELEASE
|
||||||
|
@ -116,9 +121,7 @@ if(WIN32 AND NOT CYGWIN)
|
||||||
libeay32
|
libeay32
|
||||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
"lib"
|
${_OPENSSL_PATH_SUFFIXES}
|
||||||
"VC"
|
|
||||||
"lib/VC"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(SSL_EAY_DEBUG
|
find_library(SSL_EAY_DEBUG
|
||||||
|
@ -127,9 +130,7 @@ if(WIN32 AND NOT CYGWIN)
|
||||||
ssleay32d
|
ssleay32d
|
||||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
"lib"
|
${_OPENSSL_PATH_SUFFIXES}
|
||||||
"VC"
|
|
||||||
"lib/VC"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(SSL_EAY_RELEASE
|
find_library(SSL_EAY_RELEASE
|
||||||
|
@ -139,9 +140,7 @@ if(WIN32 AND NOT CYGWIN)
|
||||||
ssl
|
ssl
|
||||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||||
PATH_SUFFIXES
|
PATH_SUFFIXES
|
||||||
"lib"
|
${_OPENSSL_PATH_SUFFIXES}
|
||||||
"VC"
|
|
||||||
"lib/VC"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(LIB_EAY_LIBRARY_DEBUG "${LIB_EAY_DEBUG}")
|
set(LIB_EAY_LIBRARY_DEBUG "${LIB_EAY_DEBUG}")
|
||||||
|
|
Loading…
Reference in New Issue