Add VcPkg OpenSSL dependency for Azure::Core (#1620)

* Add VcPkg OpenSSL dependency for Azure::Core

* OpenSSL is not required on UWP either

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
Anton Kolesnyk 2021-02-06 18:55:59 -08:00 committed by GitHub
parent b4c190b285
commit 8389e86567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 9 deletions

View File

@ -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()

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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")

View File

@ -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)

View File

@ -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()