diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt index 236724c4d..53d83716d 100644 --- a/sdk/core/azure-core/CMakeLists.txt +++ b/sdk/core/azure-core/CMakeLists.txt @@ -124,7 +124,9 @@ target_include_directories(azure-core PUBLIC ${CURL_INCLUDE_DIRS}) target_include_directories(azure-core INTERFACE ${nlohmann_json_INCLUDE_DIRS}) target_link_libraries(azure-core INTERFACE Threads::Threads nlohmann_json::nlohmann_json) -if(NOT MSVC) +if(MSVC) + target_link_libraries(azure-core PRIVATE crypt32) +else() message("Find the OpenSSL package on MacOS, used for Base64 encoding.") find_package(OpenSSL REQUIRED) target_link_libraries(azure-core PRIVATE OpenSSL::SSL) diff --git a/sdk/storage/azure-storage-common/CMakeLists.txt b/sdk/storage/azure-storage-common/CMakeLists.txt index 625eab589..c7e709231 100644 --- a/sdk/storage/azure-storage-common/CMakeLists.txt +++ b/sdk/storage/azure-storage-common/CMakeLists.txt @@ -80,7 +80,7 @@ target_include_directories(azure-storage-common PRIVATE ${LIBXML2_INCLUDE_DIRS}) target_link_libraries(azure-storage-common PRIVATE ${LIBXML2_LIBRARIES}) if(MSVC) - target_link_libraries(azure-storage-common PRIVATE bcrypt crypt32) + target_link_libraries(azure-storage-common PRIVATE bcrypt) # C28020 and C28204 are introduced by nlohmann/json target_compile_options(azure-storage-common PUBLIC /wd28204 /wd28020) else()