[aws-sdk-cpp] Fixed issue where curl and zlib cannot be found when using (#38861)

Fix issue in comment
[issuecomment](https://github.com/microsoft/vcpkg/pull/38215#issuecomment-2122692264).
```
CMake Error at /mnt/vcpkg/scripts/buildsystems/vcpkg.cmake:598 (_add_executable):
  Target "example" links to target "CURL::libcurl" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:11 (add_executable)
CMake Error at /mnt/vcpkg/scripts/buildsystems/vcpkg.cmake:598 (_add_executable):
  Target "example" links to target "ZLIB::ZLIB" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?
Call Stack (most recent call first):
  CMakeLists.txt:11 (add_executable)
```
Fixed the issue that curl and zlib cannot be found when calling s3
feature.

- [X] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] ~~SHA512s are updated for each updated download.~~
- [ ] ~~The "supports" clause reflects platforms that may be fixed by
this new version.~~
- [ ] ~~Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.~~
- [ ] ~~Any patches that are no longer applied are deleted from the
port's directory.~~
- [X] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [X] Only one version is added to each modified port's versions file.

Usage test pass with following triplets:

```
x64-windows
x64-linux
```
This commit is contained in:
jim wang 2024-05-29 08:43:10 +00:00 committed by GitHub
parent 935b5c81c2
commit 6b11f9746d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 2 deletions

View File

@ -72,6 +72,15 @@ foreach(AWS_CONFIG IN LISTS AWS_CONFIGS)
file(READ "${AWS_CONFIG}" _contents)
file(WRITE "${AWS_CONFIG}" "include(CMakeFindDependencyMacro)\nfind_dependency(aws-cpp-sdk-core)\n${_contents}")
endforeach()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/awssdk/AWSSDKConfig.cmake" "include(${CMAKE_CURRENT_LIST_DIR}/compiler_settings.cmake)"
[[include(${CMAKE_CURRENT_LIST_DIR}/compiler_settings.cmake)
include(CMakeFindDependencyMacro)
find_dependency(ZLIB)
find_dependency(CURL)]])
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/aws-cpp-sdk-core/aws-cpp-sdk-core-config.cmake" "find_dependency(aws-crt-cpp)"
[[find_dependency(aws-crt-cpp)
find_dependency(ZLIB)
find_dependency(CURL)]])
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"

View File

@ -2,7 +2,7 @@
"$note": "Automatically generated by generateFeatures.ps1",
"name": "aws-sdk-cpp",
"version": "1.11.285",
"port-version": 1,
"port-version": 2,
"description": "AWS SDK for C++",
"homepage": "https://github.com/aws/aws-sdk-cpp",
"license": "Apache-2.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "252f02a82047e15da94b42568b63b4064ae55e56",
"version": "1.11.285",
"port-version": 2
},
{
"git-tree": "86cda4ed313a3d7b3b6bd63cd7eb67f947e87855",
"version": "1.11.285",

View File

@ -426,7 +426,7 @@
},
"aws-sdk-cpp": {
"baseline": "1.11.285",
"port-version": 1
"port-version": 2
},
"azmq": {
"baseline": "2023-03-23",