Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ports/aws-sdk-cpp/CONTROL
Original file line number Diff line number Diff line change
@@ -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

Expand Down
17 changes: 14 additions & 3 deletions ports/aws-sdk-cpp/fix-AWSSDKCONFIG.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
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)
- set(AWSSDK_INSTALL_LIBDIR "${AWSSDK_INSTALL_BINDIR}")
# 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)
Expand Down
12 changes: 0 additions & 12 deletions ports/aws-sdk-cpp/usage
Original file line number Diff line number Diff line change
Expand Up @@ -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)