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

chore: Add option to disable aws dependency #269

Merged
merged 3 commits into from
Jun 4, 2024
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
26 changes: 15 additions & 11 deletions cmake/third_party.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ Include(ExternalProject)
Include(FetchContent)

option (WITH_UNWIND "Enable libunwind support" ON)
option (WITH_AWS "Include AWS client for working with S3 files" ON)
option (LEGACY_GLOG "whether to use legacy glog library" ON)


set(THIRD_PARTY_LIB_DIR "${THIRD_PARTY_DIR}/libs")
file(MAKE_DIRECTORY ${THIRD_PARTY_LIB_DIR})

Expand Down Expand Up @@ -354,17 +356,19 @@ add_third_party(
URL https://github.com/zeux/pugixml/archive/refs/tags/v1.13.tar.gz
)

set (AWS_PATCH_COMMAND patch -p1 -d ${THIRD_PARTY_DIR}/aws/ -i ${CMAKE_CURRENT_LIST_DIR}/../patches/aws-sdk-cpp-3e51fa016655eeb6b6610bdf8fe7cf33ebbf3e00.patch)

add_third_party(
aws
GIT_REPOSITORY https://github.com/aws/aws-sdk-cpp.git
GIT_TAG 3e51fa016655eeb6b6610bdf8fe7cf33ebbf3e00
GIT_SHALLOW TRUE
PATCH_COMMAND "${AWS_PATCH_COMMAND}"
CMAKE_PASS_FLAGS "-DBUILD_ONLY=s3 -DNO_HTTP_CLIENT=ON -DENABLE_TESTING=OFF -DAUTORUN_UNIT_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_LIBDIR=lib"
LIB libaws-cpp-sdk-s3.a libaws-cpp-sdk-core.a libaws-crt-cpp.a libaws-c-mqtt.a libaws-c-event-stream.a libaws-c-s3.a libaws-c-auth.a libaws-c-http.a libaws-c-io.a libs2n.a libaws-c-compression.a libaws-c-cal.a libaws-c-sdkutils.a libaws-checksums.a libaws-c-common.a
)
if (WITH_AWS)
set (AWS_PATCH_COMMAND patch -p1 -d ${THIRD_PARTY_DIR}/aws/ -i ${CMAKE_CURRENT_LIST_DIR}/../patches/aws-sdk-cpp-3e51fa016655eeb6b6610bdf8fe7cf33ebbf3e00.patch)

add_third_party(
aws
GIT_REPOSITORY https://github.com/aws/aws-sdk-cpp.git
GIT_TAG 3e51fa016655eeb6b6610bdf8fe7cf33ebbf3e00
GIT_SHALLOW TRUE
PATCH_COMMAND "${AWS_PATCH_COMMAND}"
CMAKE_PASS_FLAGS "-DBUILD_ONLY=s3 -DNO_HTTP_CLIENT=ON -DENABLE_TESTING=OFF -DAUTORUN_UNIT_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_LIBDIR=lib"
LIB libaws-cpp-sdk-s3.a libaws-cpp-sdk-core.a libaws-crt-cpp.a libaws-c-mqtt.a libaws-c-event-stream.a libaws-c-s3.a libaws-c-auth.a libaws-c-http.a libaws-c-io.a libs2n.a libaws-c-compression.a libaws-c-cal.a libaws-c-sdkutils.a libaws-checksums.a libaws-c-common.a
)
endif()

add_third_party(
cares
Expand Down
6 changes: 4 additions & 2 deletions util/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
cxx_test(accept_server_test fibers2 http_beast_prebuilt LABELS CI)


find_package(OpenSSL)

add_subdirectory(fibers)
add_subdirectory(html)
add_subdirectory(metrics)
add_subdirectory(tls)
add_subdirectory(http)
add_subdirectory(aws)

if (WITH_AWS)
add_subdirectory(aws)
endif()