summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenSSL.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-22 11:55:27 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-22 11:55:27 (GMT)
commit0d8c5ba42a075184f4383c62bd91e67fd5c4ccf0 (patch)
tree42fc5f79e4bdf40a928eeb5d99f6f3c76f809693 /Modules/FindOpenSSL.cmake
parent2c2ffd3874f749979d723d7a788d45e3830952d6 (diff)
downloadCMake-0d8c5ba42a075184f4383c62bd91e67fd5c4ccf0.zip
CMake-0d8c5ba42a075184f4383c62bd91e67fd5c4ccf0.tar.gz
CMake-0d8c5ba42a075184f4383c62bd91e67fd5c4ccf0.tar.bz2
FindOpenSSL: Search in more-specific directories before less-specific
Since commit v3.6.0-rc1~182^2 (FindOpenSSL: Prefer libs early in search path regardless of name, 2016-04-04) we use the `NAMES_PER_DIR` option to `find_library` calls to consider all names in each directory before moving on to the next directory. Fix our library search directory ordering to place more-specific (e.g. VC/) directories before the general directories. Otherwise they may never be considered. Closes: #16320
Diffstat (limited to 'Modules/FindOpenSSL.cmake')
-rw-r--r--Modules/FindOpenSSL.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 7ddd783..034b0e6 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -142,15 +142,15 @@ if(WIN32 AND NOT CYGWIN)
if(OPENSSL_USE_STATIC_LIBS)
set(_OPENSSL_PATH_SUFFIXES
- "lib"
- "VC/static"
"lib/VC/static"
+ "VC/static"
+ "lib"
)
else()
set(_OPENSSL_PATH_SUFFIXES
- "lib"
- "VC"
"lib/VC"
+ "VC"
+ "lib"
)
endif ()
@@ -227,8 +227,8 @@ if(WIN32 AND NOT CYGWIN)
NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
- "lib"
"lib/MinGW"
+ "lib"
)
find_library(SSL_EAY
@@ -237,8 +237,8 @@ if(WIN32 AND NOT CYGWIN)
NAMES_PER_DIR
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
- "lib"
"lib/MinGW"
+ "lib"
)
mark_as_advanced(SSL_EAY LIB_EAY)