Skip to content

Commit

Permalink
[aws-sdk-cpp] Add find_dependency to AWSSDKConfig.cmake and fix usage (
Browse files Browse the repository at this point in the history
  • Loading branch information
JackBoosY committed Dec 5, 2020
1 parent 09f0dc0 commit 87a908d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
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)

0 comments on commit 87a908d

Please sign in to comment.