diff options
author | Thijs Wenker <me@thoys.nl> | 2015-07-30 14:09:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-30 14:33:12 (GMT) |
commit | fbcbf7f29d630c8a291f0d0e543defbf1b8208df (patch) | |
tree | c09ef64dae592705a0c933862511a72fdb575781 /Modules/FindOpenSSL.cmake | |
parent | 4c10461a877d8ca8f18c952c2c143320337d04a7 (diff) | |
download | CMake-fbcbf7f29d630c8a291f0d0e543defbf1b8208df.zip CMake-fbcbf7f29d630c8a291f0d0e543defbf1b8208df.tar.gz CMake-fbcbf7f29d630c8a291f0d0e543defbf1b8208df.tar.bz2 |
FindOpenSSL: De-duplicate find_library path suffixes on Windows
Store the path suffixes in a variable and reference it in each
find_library call.
Diffstat (limited to 'Modules/FindOpenSSL.cmake')
-rw-r--r-- | Modules/FindOpenSSL.cmake | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index ad22580..7545d94 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -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 : # libeay32MD.lib is identical to ../libeay32.lib, and # ssleay32MD.lib is identical to ../ssleay32.lib + + set(_OPENSSL_PATH_SUFFIXES + "lib" + "VC" + "lib/VC" + ) + find_library(LIB_EAY_DEBUG NAMES libeay32MDd libeay32d ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES - "lib" - "VC" - "lib/VC" + ${_OPENSSL_PATH_SUFFIXES} ) find_library(LIB_EAY_RELEASE @@ -116,9 +121,7 @@ if(WIN32 AND NOT CYGWIN) libeay32 ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES - "lib" - "VC" - "lib/VC" + ${_OPENSSL_PATH_SUFFIXES} ) find_library(SSL_EAY_DEBUG @@ -127,9 +130,7 @@ if(WIN32 AND NOT CYGWIN) ssleay32d ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES - "lib" - "VC" - "lib/VC" + ${_OPENSSL_PATH_SUFFIXES} ) find_library(SSL_EAY_RELEASE @@ -139,9 +140,7 @@ if(WIN32 AND NOT CYGWIN) ssl ${_OPENSSL_ROOT_HINTS_AND_PATHS} PATH_SUFFIXES - "lib" - "VC" - "lib/VC" + ${_OPENSSL_PATH_SUFFIXES} ) set(LIB_EAY_LIBRARY_DEBUG "${LIB_EAY_DEBUG}") |