lordgamez commented on a change in pull request #1140:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1140#discussion_r677400782
##########
File path: cmake/BundledAwsSdkCpp.cmake
##########
@@ -120,71 +92,100 @@ function(use_bundled_libaws SOURCE_DIR BINARY_DIR)
)
# Set dependencies
- add_dependencies(aws-c-common-external CURL::libcurl OpenSSL::Crypto
OpenSSL::SSL ZLIB::ZLIB)
- add_dependencies(aws-checksum-external aws-c-common-external CURL::libcurl
OpenSSL::Crypto OpenSSL::SSL ZLIB::ZLIB)
- add_dependencies(aws-c-event-stream-external CURL::libcurl OpenSSL::Crypto
OpenSSL::SSL ZLIB::ZLIB)
- add_dependencies(aws-c-event-stream-external aws-c-common-external
aws-checksum-external)
add_dependencies(aws-sdk-cpp-external CURL::libcurl OpenSSL::Crypto
OpenSSL::SSL ZLIB::ZLIB)
- add_dependencies(aws-sdk-cpp-external aws-c-event-stream-external
aws-c-common-external aws-checksum-external)
# Set variables
set(LIBAWS_FOUND "YES" CACHE STRING "" FORCE)
set(LIBAWS_INCLUDE_DIR "${BINARY_DIR}/thirdparty/libaws-install/include"
CACHE STRING "" FORCE)
set(LIBAWS_LIBRARIES
${AWSSDK_LIBRARIES_LIST}
-
"${BINARY_DIR}/thirdparty/libaws-install/${CMAKE_INSTALL_LIBDIR}/${PREFIX}aws-c-event-stream.${SUFFIX}"
-
"${BINARY_DIR}/thirdparty/libaws-install/${CMAKE_INSTALL_LIBDIR}/${PREFIX}aws-c-common.${SUFFIX}"
-
"${BINARY_DIR}/thirdparty/libaws-install/${CMAKE_INSTALL_LIBDIR}/${PREFIX}aws-checksums.${SUFFIX}"
CACHE STRING "" FORCE)
# Create imported targets
file(MAKE_DIRECTORY ${LIBAWS_INCLUDE_DIR})
add_library(AWS::aws-c-common STATIC IMPORTED)
set_target_properties(AWS::aws-c-common PROPERTIES IMPORTED_LOCATION
"${BINARY_DIR}/thirdparty/libaws-install/${CMAKE_INSTALL_LIBDIR}/${PREFIX}aws-c-common.${SUFFIX}")
- add_dependencies(AWS::aws-c-common aws-c-common-external)
- set_property(TARGET AWS::aws-c-common APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${LIBAWS_INCLUDE_DIR})
- set_property(TARGET AWS::aws-c-common APPEND PROPERTY
INTERFACE_LINK_LIBRARIES CURL::libcurl OpenSSL::Crypto OpenSSL::SSL ZLIB::ZLIB
Threads::Threads)
- if (APPLE)
- set_property(TARGET AWS::aws-c-common APPEND PROPERTY
INTERFACE_LINK_LIBRARIES "-framework CoreFoundation")
+ add_dependencies(AWS::aws-c-common aws-sdk-cpp-external)
+ target_include_directories(AWS::aws-c-common INTERFACE
${LIBAWS_INCLUDE_DIR})
+
+ if (NOT WIN32 AND NOT APPLE)
+ add_library(AWS::s2n STATIC IMPORTED)
+ set_target_properties(AWS::s2n PROPERTIES IMPORTED_LOCATION
"${BINARY_DIR}/thirdparty/libaws-install/${CMAKE_INSTALL_LIBDIR}/${PREFIX}s2n.${SUFFIX}")
+ add_dependencies(AWS::s2n aws-sdk-cpp-external)
+ target_include_directories(AWS::s2n INTERFACE ${LIBAWS_INCLUDE_DIR})
endif()
+ add_library(AWS::aws-c-io STATIC IMPORTED)
+ set_target_properties(AWS::aws-c-io PROPERTIES IMPORTED_LOCATION
"${BINARY_DIR}/thirdparty/libaws-install/${CMAKE_INSTALL_LIBDIR}/${PREFIX}aws-c-io.${SUFFIX}")
+ add_dependencies(AWS::aws-c-io aws-sdk-cpp-external)
+ target_include_directories(AWS::aws-c-io INTERFACE ${LIBAWS_INCLUDE_DIR})
+ target_link_libraries(AWS::aws-c-io INTERFACE AWS::aws-c-common)
+
add_library(AWS::aws-checksums STATIC IMPORTED)
set_target_properties(AWS::aws-checksums PROPERTIES IMPORTED_LOCATION
"${BINARY_DIR}/thirdparty/libaws-install/${CMAKE_INSTALL_LIBDIR}/${PREFIX}aws-checksums.${SUFFIX}")
- add_dependencies(AWS::aws-checksums aws-checksums-external)
- set_property(TARGET AWS::aws-checksums APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${LIBAWS_INCLUDE_DIR})
- set_property(TARGET AWS::aws-checksums APPEND PROPERTY
INTERFACE_LINK_LIBRARIES CURL::libcurl OpenSSL::Crypto OpenSSL::SSL ZLIB::ZLIB
Threads::Threads)
- if (APPLE)
- set_property(TARGET AWS::aws-checksums APPEND PROPERTY
INTERFACE_LINK_LIBRARIES "-framework CoreFoundation")
- endif()
+ add_dependencies(AWS::aws-checksums aws-sdk-cpp-external)
+ target_include_directories(AWS::aws-checksums INTERFACE
${LIBAWS_INCLUDE_DIR})
add_library(AWS::aws-c-event-stream STATIC IMPORTED)
set_target_properties(AWS::aws-c-event-stream PROPERTIES IMPORTED_LOCATION
"${BINARY_DIR}/thirdparty/libaws-install/${CMAKE_INSTALL_LIBDIR}/${PREFIX}aws-c-event-stream.${SUFFIX}")
- add_dependencies(AWS::aws-c-event-stream aws-c-event-stream-external)
- set_property(TARGET AWS::aws-c-event-stream APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${LIBAWS_INCLUDE_DIR})
- set_property(TARGET AWS::aws-c-event-stream APPEND PROPERTY
INTERFACE_LINK_LIBRARIES AWS::aws-c-common AWS::aws-checksums CURL::libcurl
OpenSSL::Crypto OpenSSL::SSL ZLIB::ZLIB Threads::Threads)
- if (APPLE)
- set_property(TARGET AWS::aws-c-event-stream APPEND PROPERTY
INTERFACE_LINK_LIBRARIES "-framework CoreFoundation")
- endif()
+ add_dependencies(AWS::aws-c-event-stream aws-sdk-cpp-external)
+ target_include_directories(AWS::aws-c-event-stream INTERFACE
${LIBAWS_INCLUDE_DIR})
+ target_link_libraries(AWS::aws-c-event-stream INTERFACE AWS::aws-checksums
AWS::aws-c-io)
+
+ add_library(AWS::aws-c-auth STATIC IMPORTED)
+ set_target_properties(AWS::aws-c-auth PROPERTIES IMPORTED_LOCATION
"${BINARY_DIR}/thirdparty/libaws-install/${CMAKE_INSTALL_LIBDIR}/${PREFIX}aws-c-auth.${SUFFIX}")
+ add_dependencies(AWS::aws-c-auth aws-sdk-cpp-external)
+ target_include_directories(AWS::aws-c-auth INTERFACE ${LIBAWS_INCLUDE_DIR})
+
+ add_library(AWS::aws-c-s3 STATIC IMPORTED)
+ set_target_properties(AWS::aws-c-s3 PROPERTIES IMPORTED_LOCATION
"${BINARY_DIR}/thirdparty/libaws-install/${CMAKE_INSTALL_LIBDIR}/${PREFIX}aws-c-s3.${SUFFIX}")
+ add_dependencies(AWS::aws-c-s3 aws-sdk-cpp-external)
+ target_include_directories(AWS::aws-c-s3 INTERFACE ${LIBAWS_INCLUDE_DIR})
+ target_link_libraries(AWS::aws-c-s3 INTERFACE AWS::aws-c-auth)
Review comment:
I checked out the S3 CRT client and one problem I realized is that the
new `Aws::S3Crt::ClientConfiguration` does not have all the features the
previously used `Aws::Client::ClientConfiguration` has. We currently have
properties in our S3 processors for proxy options and a communications timeout
option that are missing from the new configuration. I'm not sure if these will
be introduced later, I'll ask the developers about these features using the S3
CRT lib.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]