ClickHouse/cmake/find/s3.cmake

27 lines
1.0 KiB
CMake
Raw Normal View History

2019-12-20 14:46:00 +00:00
if(NOT OS_FREEBSD AND NOT APPLE AND NOT ARCH_ARM)
2019-12-06 14:37:21 +00:00
option(ENABLE_S3 "Enable S3" ${ENABLE_LIBRARIES})
endif()
2019-12-03 16:23:24 +00:00
if(ENABLE_S3)
option(USE_INTERNAL_AWS_S3_LIBRARY "Set to FALSE to use system S3 instead of bundled" ${NOT_UNBUNDLED})
2019-12-06 14:37:21 +00:00
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-s3")
message (WARNING "submodule contrib/aws is missing. to fix try run: \n git submodule update --init --recursive")
set (MISSING_AWS_S3 1)
endif ()
2019-12-06 14:37:21 +00:00
if (USE_INTERNAL_AWS_S3_LIBRARY AND NOT MISSING_AWS_S3)
set(AWS_S3_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-s3/include")
set(AWS_S3_CORE_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-core/include")
set(AWS_S3_LIBRARY aws_s3)
set(USE_INTERNAL_AWS_S3_LIBRARY 1)
set(USE_AWS_S3 1)
else()
set(USE_INTERNAL_AWS_S3_LIBRARY 0)
set(USE_AWS_S3 0)
2019-12-03 16:23:24 +00:00
endif ()
endif()
2019-12-03 16:23:24 +00:00
message (STATUS "Using aws_s3=${USE_AWS_S3}: ${AWS_S3_INCLUDE_DIR} : ${AWS_S3_LIBRARY}")