From 0d34fc5df27c9909eb80df378ccc481780d23c71 Mon Sep 17 00:00:00 2001 From: ctrlaltca Date: Sun, 12 Mar 2017 18:21:30 +0100 Subject: [PATCH] fix_2424 (#2461) --- cmake/FindWin32SslRuntime.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/FindWin32SslRuntime.cmake b/cmake/FindWin32SslRuntime.cmake index 45504d64..9cca2f7b 100644 --- a/cmake/FindWin32SslRuntime.cmake +++ b/cmake/FindWin32SslRuntime.cmake @@ -48,9 +48,10 @@ set(_OPENSSL_ROOT_HINTS_AND_PATHS PATHS ${_OPENSSL_ROOT_PATHS} ) -# Even if the dll is 64bit, it's still suffixed as *32.dll -FIND_FILE(WIN32SSLRUNTIME_LIBEAY NAMES libeay32.dll ${_OPENSSL_ROOT_HINTS_AND_PATHS}) -FIND_FILE(WIN32SSLRUNTIME_SSLEAY NAMES ssleay32.dll ${_OPENSSL_ROOT_HINTS_AND_PATHS}) +# For OpenSSL < 1.1, they are named libeay32 and ssleay32 and even if the dll is 64bit, it's still suffixed as *32.dll +# For OpenSSL >= 1.1, they are named libcrypto and libssl with no suffix +FIND_FILE(WIN32SSLRUNTIME_LIBEAY NAMES libeay32.dll libcrypto.dll ${_OPENSSL_ROOT_HINTS_AND_PATHS}) +FIND_FILE(WIN32SSLRUNTIME_SSLEAY NAMES ssleay32.dll libssl.dll ${_OPENSSL_ROOT_HINTS_AND_PATHS}) IF(WIN32SSLRUNTIME_LIBEAY AND WIN32SSLRUNTIME_SSLEAY)