summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenSSL.cmake
diff options
context:
space:
mode:
authorOrgad Shaneh <orgads@gmail.com>2021-06-07 16:23:13 (GMT)
committerOrgad Shaneh <orgads@gmail.com>2021-06-07 16:23:13 (GMT)
commit98fa09d5befbb970fe6230b95f49ee6821d301b1 (patch)
treeefa0877d645ef87dcc89aefe914835c859698179 /Modules/FindOpenSSL.cmake
parent4ee2fc28a66930836cbd1493cdf420a477b500e9 (diff)
downloadCMake-98fa09d5befbb970fe6230b95f49ee6821d301b1.zip
CMake-98fa09d5befbb970fe6230b95f49ee6821d301b1.tar.gz
CMake-98fa09d5befbb970fe6230b95f49ee6821d301b1.tar.bz2
FindOpenSSL: Link with ws2_32 and crypt32 on Windows/static
Diffstat (limited to 'Modules/FindOpenSSL.cmake')
-rw-r--r--Modules/FindOpenSSL.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index b1afa5f..8474e05 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -123,6 +123,10 @@ function(_OpenSSL_target_add_dependencies target)
set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads )
set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${CMAKE_DL_LIBS} )
endif()
+ if(WIN32 AND OPENSSL_USE_STATIC_LIBS)
+ set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ws2_32 )
+ set_property( TARGET ${target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES crypt32 )
+ endif()
endfunction()
if (UNIX)