Skip to content

Commit

Permalink
FindOpenSSL: Link with ws2_32 and crypt32 on Windows/static
Browse files Browse the repository at this point in the history
  • Loading branch information
orgads committed Jun 7, 2021
1 parent 4ee2fc2 commit 98fa09d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Modules/FindOpenSSL.cmake
Expand Up @@ -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)
Expand Down

0 comments on commit 98fa09d

Please sign in to comment.