修复Windows下链接OpenSSL静态库缺少Crypt32库的问题 (#3552)

Co-authored-by: 李道甫 <lidf@ahtelit.com>
This commit is contained in:
Lidaofu 2024-05-19 10:34:46 +08:00 committed by GitHub
parent 0935da60a3
commit 968f6c69c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -403,6 +403,8 @@ if(OPENSSL_FOUND AND ENABLE_OPENSSL)
update_cached_list(MK_LINK_LIBRARIES ${OPENSSL_LIBRARIES})
if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND OPENSSL_USE_STATIC_LIBS)
update_cached_list(MK_LINK_LIBRARIES ${CMAKE_DL_LIBS})
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND OPENSSL_USE_STATIC_LIBS)
update_cached_list(MK_LINK_LIBRARIES Crypt32)
endif()
else()
set(ENABLE_OPENSSL OFF)