1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-21 14:00:51 +03:00

Link with crypt32.lib on Windows.

Makes linking with static OpenSSL work again.  Although it's not
required for dynamic OpenSSL, it does no harm.

Fixes #98.
This commit is contained in:
Alexander Lamaison
2016-03-15 21:35:04 +00:00
parent e6278aa2a6
commit 7b9a9a782d

View File

@@ -71,6 +71,11 @@ if(CRYPTO_BACKEND STREQUAL "OpenSSL" OR NOT CRYPTO_BACKEND)
list(APPEND PC_REQUIRES_PRIVATE libssl libcrypto)
if (WIN32)
# Statically linking to OpenSSL requires crypt32 for some Windows APIs.
# This should really be handled by FindOpenSSL.cmake.
list(APPEND LIBRARIES crypt32)
list(APPEND PC_LIBS -lcrypt32)
find_file(DLL_LIBEAY32
NAMES libeay32.dll crypto.dll
HINTS ${_OPENSSL_ROOT_HINTS} PATHS ${_OPENSSL_ROOT_PATHS}