From 8934b2118ff8c3865926396107b4d77fb5edd744 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Fri, 18 Nov 2022 16:11:55 -0800 Subject: [PATCH] This was first discovered by trying to update curl in vcpkg: https://github.com/microsoft/vcpkg/pull/27778 (#4127) Curl is no longer publishing that it depends on ws2_32 when dynamically linked. Azure Core directly uses Ws2_32 things, so it needs that declared dependency. For example: https://github.com/Azure/azure-sdk-for-cpp/blob/90fc46693f4b90b805047f165c0b41e07e867594/sdk/core/azure-core/src/http/curl/curl.cpp#L165 --- sdk/core/azure-core/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt index 04eea7a21..ae4bad15a 100644 --- a/sdk/core/azure-core/CMakeLists.txt +++ b/sdk/core/azure-core/CMakeLists.txt @@ -179,6 +179,9 @@ endif() if(BUILD_TRANSPORT_CURL) target_link_libraries(azure-core PUBLIC CURL::libcurl) + if(WIN32) + target_link_libraries(azure-core PRIVATE Ws2_32) + endif() endif() if(BUILD_TRANSPORT_WINHTTP) target_link_libraries(azure-core PRIVATE winhttp WIL::WIL)