Explorar o código

Merge topic 'openssl-static'

98fa09d5be FindOpenSSL: Link with ws2_32 and crypt32 on Windows/static

Acked-by: Kitware Robot <[email protected]>
Merge-request: !6197
Brad King %!s(int64=4) %!d(string=hai) anos
pai
achega
df1398aa97
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Modules/FindOpenSSL.cmake

+ 4 - 0
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)