mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
d456aa86ef
This reverts commit 89419ceb9b
(curl part moved to separate commit)
Squashed:
- termcap removed
- fix for cassandra on apple merged
- cmake: fix "Can't find system zlib library" in unbundled build
- cmake: fix condition when testing for rdkafka platform
- cmake: PROTOBUF_OLD_ABI_COMPAT shouldn't be enabled for internal protobuf
Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com>
28 lines
1.1 KiB
CMake
28 lines
1.1 KiB
CMake
option (USE_INTERNAL_ZSTD_LIBRARY "Set to FALSE to use system zstd library instead of bundled" ${NOT_UNBUNDLED})
|
|
|
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/zstd/lib/zstd.h")
|
|
if(USE_INTERNAL_ZSTD_LIBRARY)
|
|
message(WARNING "submodule contrib/zstd is missing. to fix try run: \n git submodule update --init --recursive")
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal zstd library")
|
|
set(USE_INTERNAL_ZSTD_LIBRARY 0)
|
|
endif()
|
|
set(MISSING_INTERNAL_ZSTD_LIBRARY 1)
|
|
endif()
|
|
|
|
if (NOT USE_INTERNAL_ZSTD_LIBRARY)
|
|
find_library (ZSTD_LIBRARY zstd)
|
|
find_path (ZSTD_INCLUDE_DIR NAMES zstd.h PATHS ${ZSTD_INCLUDE_PATHS})
|
|
if (NOT ZSTD_LIBRARY OR NOT ZSTD_INCLUDE_DIR)
|
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system zstd library")
|
|
endif ()
|
|
endif ()
|
|
|
|
if (ZSTD_LIBRARY AND ZSTD_INCLUDE_DIR)
|
|
elseif (NOT MISSING_INTERNAL_ZSTD_LIBRARY)
|
|
set (USE_INTERNAL_ZSTD_LIBRARY 1)
|
|
set (ZSTD_LIBRARY zstd)
|
|
set (ZSTD_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/zstd/lib)
|
|
endif ()
|
|
|
|
message (STATUS "Using zstd: ${ZSTD_INCLUDE_DIR} : ${ZSTD_LIBRARY}")
|