CodeCommitsIssuesPull requestsActionsInsightsSecurity
030a8a4164c6eb087d139aaae89aa4b47b36919a

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/find/avro.cmake

28lines · modecode

1option (ENABLE_AVRO "Enable Avro" ${ENABLE_LIBRARIES})
2
3if (ENABLE_AVRO)
4
5option (USE_INTERNAL_AVRO_LIBRARY "Set to FALSE to use system avro library instead of bundled" ${NOT_UNBUNDLED})
6
7if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/avro/lang/c++/CMakeLists.txt")
8 if(USE_INTERNAL_AVRO_LIBRARY)
9 message(WARNING "submodule contrib/avro is missing. to fix try run: \n git submodule update --init --recursive")
10 endif()
11 set(MISSING_INTERNAL_AVRO_LIBRARY 1)
12 set(USE_INTERNAL_AVRO_LIBRARY 0)
13endif()
14
15if (NOT USE_INTERNAL_AVRO_LIBRARY)
16elseif(NOT MISSING_INTERNAL_AVRO_LIBRARY)
17 include(cmake/find/snappy.cmake)
18 set(AVROCPP_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/avro/lang/c++/include")
19 set(AVROCPP_LIBRARY avrocpp)
20endif ()
21
22if (AVROCPP_LIBRARY AND AVROCPP_INCLUDE_DIR)
23 set(USE_AVRO 1)
24endif()
25
26endif()
27
28message (STATUS "Using avro=${USE_AVRO}: ${AVROCPP_INCLUDE_DIR} : ${AVROCPP_LIBRARY}")