From e069c38a15dbe065e0fad296bb6437e1ea3ca5ed Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 22 Mar 2023 15:09:42 +0100 Subject: [PATCH] cmake/OpenSSL.cmake: Need to tell cmake that the imported openssl targets need to link with Crytp32 and ws2_32 libraries. --- cmake/OpenSSL.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/OpenSSL.cmake b/cmake/OpenSSL.cmake index 5fe070e..eceaf3e 100644 --- a/cmake/OpenSSL.cmake +++ b/cmake/OpenSSL.cmake @@ -24,4 +24,5 @@ find_package(OpenSSL 1.1 REQUIRED) # Bug in FindOpenSSL. Win needs to link to these if static libs are used. if (WIN32 AND OPENSSL_USE_STATIC_LIBS) set (OPENSSL_CRYPTO_LIBRARY "${OPENSSL_CRYPTO_LIBRARY};Crypt32;ws2_32") + target_link_libraries(OpenSSL::Crypto INTERFACE "Crypt32;ws2_32") endif()