fix build error introduced in PR #1297 and #1298 (#1303)

# Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the [contributing guide](https://github.com/Azure/azure-sdk-for-cpp/blob/master/CONTRIBUTING.md#pull-requests).

- [x] [C++ Guidelines](https://azure.github.io/azure-sdk/cpp_introduction.html)
- [x] Doxygen docs
- [x] Unit tests
- [x] No unwanted commits/changes
- [x] Descriptive title/description
  - [x] PR is single purpose
  - [x] Related issue listed
- [x] Comments in source
- [x] No typos
- [x] Update changelog
- [x] Not work-in-progress
- [x] External references or docs updated
- [x] Self review of PR done
- [x] Any breaking changes?
This commit is contained in:
JinmingHu 2021-01-11 11:40:48 +08:00 committed by GitHub
parent fb33402844
commit dc8c9182e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

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

View File

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