diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt index da42946a7..6eb557c12 100644 --- a/sdk/core/azure-core/CMakeLists.txt +++ b/sdk/core/azure-core/CMakeLists.txt @@ -116,10 +116,9 @@ create_code_coverage(core azure-core azure-core-test) target_link_libraries(azure-core INTERFACE Threads::Threads) -if(MSVC) +if(WIN32) 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) endif() diff --git a/sdk/core/azure-core/vcpkg/CONTROL b/sdk/core/azure-core/vcpkg/CONTROL index 5fa51fe8c..573576a0b 100644 --- a/sdk/core/azure-core/vcpkg/CONTROL +++ b/sdk/core/azure-core/vcpkg/CONTROL @@ -3,6 +3,7 @@ # Source: azure-core-cpp Version: @AZ_LIBRARY_VERSION@ +Build-Depends: openssl (!windows&!uwp) Description: Microsoft Azure Core SDK for C++ This library provides shared primitives, abstractions, and helpers for modern Azure SDK client libraries written in the C++. Homepage: https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/core/azure-core diff --git a/sdk/core/azure-core/vcpkg/Config.cmake.in b/sdk/core/azure-core/vcpkg/Config.cmake.in index 0c2c595d9..fc0bf3d98 100644 --- a/sdk/core/azure-core/vcpkg/Config.cmake.in +++ b/sdk/core/azure-core/vcpkg/Config.cmake.in @@ -5,10 +5,15 @@ include(CMakeFindDependencyMacro) find_dependency(Threads) + if(@BUILD_TRANSPORT_CURL@) find_dependency(CURL @CURL_MIN_REQUIRED_VERSION@) endif() +if(NOT WIN32) + find_dependency(OpenSSL) +endif() + include("${CMAKE_CURRENT_LIST_DIR}/azure-core-cppTargets.cmake") check_required_components("azure-core-cpp") diff --git a/sdk/keyvault/azure-security-keyvault-common/vcpkg/CONTROL b/sdk/keyvault/azure-security-keyvault-common/vcpkg/CONTROL index 9b0df7472..0e7c7aa58 100644 --- a/sdk/keyvault/azure-security-keyvault-common/vcpkg/CONTROL +++ b/sdk/keyvault/azure-security-keyvault-common/vcpkg/CONTROL @@ -1,6 +1,6 @@ Source: azure-security-keyvault-common-cpp Version: @AZ_LIBRARY_VERSION@ -Build-Depends: azure-core-cpp, openssl (!windows) +Build-Depends: azure-core-cpp Description: Microsoft Azure Common Key Vault SDK for C++ This library provides common Azure KeyVault-related abstractions for Azure SDK. Homepage: https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/keyvault/azure-security-keyvault-common diff --git a/sdk/keyvault/azure-security-keyvault-common/vcpkg/Config.cmake.in b/sdk/keyvault/azure-security-keyvault-common/vcpkg/Config.cmake.in index e21df0e77..ca4474e25 100644 --- a/sdk/keyvault/azure-security-keyvault-common/vcpkg/Config.cmake.in +++ b/sdk/keyvault/azure-security-keyvault-common/vcpkg/Config.cmake.in @@ -6,10 +6,6 @@ include(CMakeFindDependencyMacro) find_dependency(azure-core-cpp) -if(NOT MSVC) - find_dependency(OpenSSL) -endif() - include("${CMAKE_CURRENT_LIST_DIR}/azure-security-keyvault-common-cppTargets.cmake") check_required_components("azure-security-keyvault-common-cpp") diff --git a/sdk/storage/azure-storage-common/CMakeLists.txt b/sdk/storage/azure-storage-common/CMakeLists.txt index 8e1fba9c4..f35763afa 100644 --- a/sdk/storage/azure-storage-common/CMakeLists.txt +++ b/sdk/storage/azure-storage-common/CMakeLists.txt @@ -80,7 +80,7 @@ target_link_libraries(azure-storage-common PUBLIC Azure::azure-core) target_include_directories(azure-storage-common PRIVATE ${LIBXML2_INCLUDE_DIRS}) target_link_libraries(azure-storage-common PRIVATE ${LIBXML2_LIBRARIES}) -if(MSVC) +if(WIN32) 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) diff --git a/sdk/storage/azure-storage-common/vcpkg/Config.cmake.in b/sdk/storage/azure-storage-common/vcpkg/Config.cmake.in index 40f075b59..bfc35637e 100644 --- a/sdk/storage/azure-storage-common/vcpkg/Config.cmake.in +++ b/sdk/storage/azure-storage-common/vcpkg/Config.cmake.in @@ -8,7 +8,7 @@ find_dependency(LibXml2) find_dependency(Threads) find_dependency(azure-core-cpp) -if(NOT MSVC) +if(NOT WIN32) find_dependency(OpenSSL) endif()