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:
@@ -71,6 +71,11 @@ if(CRYPTO_BACKEND STREQUAL "OpenSSL" OR NOT CRYPTO_BACKEND)
|
|||||||
list(APPEND PC_REQUIRES_PRIVATE libssl libcrypto)
|
list(APPEND PC_REQUIRES_PRIVATE libssl libcrypto)
|
||||||
|
|
||||||
if (WIN32)
|
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
|
find_file(DLL_LIBEAY32
|
||||||
NAMES libeay32.dll crypto.dll
|
NAMES libeay32.dll crypto.dll
|
||||||
HINTS ${_OPENSSL_ROOT_HINTS} PATHS ${_OPENSSL_ROOT_PATHS}
|
HINTS ${_OPENSSL_ROOT_HINTS} PATHS ${_OPENSSL_ROOT_PATHS}
|
||||||
|
|||||||
Reference in New Issue
Block a user