[aws-sdk-cpp] Add find_dependency to AWSSDKConfig.cmake and fix usage (#14936)

This commit is contained in:
Jack·Boos·Yu 2020-12-04 16:15:10 -08:00 committed by GitHub
parent 09f0dc0a79
commit 87a908d7b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 17 deletions

View File

@ -1,9 +1,9 @@
Source: aws-sdk-cpp
Version: 1.8.83
Port-Version: 3
Port-Version: 4
Homepage: https://github.com/aws/aws-sdk-cpp
Description: AWS SDK for C++
Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows), aws-c-event-stream
Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows), aws-c-event-stream, zlib
Default-Features: dynamodb, s3, kinesis
# Automatically generated by generateFeatures.ps1

View File

@ -1,8 +1,19 @@
diff --git a/cmake/AWSSDKConfig.cmake b/cmake/AWSSDKConfig.cmake
index c2f643e..5a4d8d2 100644
index c2f643e..4fb4a2f 100644
--- a/cmake/AWSSDKConfig.cmake
+++ b/cmake/AWSSDKConfig.cmake
@@ -43,7 +43,6 @@ endif()
@@ -24,6 +24,10 @@ if(AWSSDK_FOUND)
return()
endif()
+include(CMakeFindDependencyMacro)
+find_dependency(OpenSSL)
+find_dependency(ZLIB)
+
include(${CMAKE_CURRENT_LIST_DIR}/AWSSDKConfigVersion.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/sdksCommon.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/platformDeps.cmake)
@@ -43,7 +47,6 @@ endif()
# On Windows, dlls are treated as runtime target and installed in bindir
if (WIN32 AND AWSSDK_INSTALL_AS_SHARED_LIBS)
@ -10,7 +21,7 @@ index c2f643e..5a4d8d2 100644
# If installed CMake scripts are associated with dll library, define USE_IMPORT_EXPORT for customers
add_definitions(-DUSE_IMPORT_EXPORT)
endif()
@@ -54,7 +53,6 @@ endif()
@@ -54,7 +57,6 @@ endif()
get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH)
get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH)

View File

@ -3,15 +3,3 @@ The package @PORT@:@TARGET_TRIPLET@ provides CMake targets:
find_package(AWSSDK CONFIG COMPONENTS core dynamodb kinesis s3 REQUIRED)
target_include_directories(main PRVATE ${AWSSDK_INCLUDE_DIRS})
target_link_libraries(main PRIVATE ${AWSSDK_LIBRARIES})
find_package(aws-cpp-sdk-core CONFIG REQUIRED)
target_link_libraries(main PRIVATE aws-cpp-sdk-core)
find_package(aws-cpp-sdk-dynamodb CONFIG REQUIRED)
target_link_libraries(main PRIVATE aws-cpp-sdk-dynamodb)
find_package(aws-cpp-sdk-kinesis CONFIG REQUIRED)
target_link_libraries(main PRIVATE aws-cpp-sdk-kinesis)
find_package(aws-cpp-sdk-s3 CONFIG REQUIRED)
target_link_libraries(main PRIVATE aws-cpp-sdk-s3)