ClickHouse/contrib/protobuf-cmake/CMakeLists.txt
Konstantin Podshumok 3ec7a4bc53
cmake: make sure ENABLE_GRPC is off by default when PROTOBUF is OFF by default
Squashed:
- cmake: make sure protobuf compiler and snappy are there for unbundled build
- cmake: Turn ON internal GRPC library by default until relevant features will be implemented
- cmake: allow unbundled grpc

Signed-off-by: Konstantin Podshumok <kpp.live+signed@gmail.com>
2020-08-25 20:16:39 +03:00

14 lines
530 B
CMake

set(protobuf_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/protobuf")
set(protobuf_BINARY_DIR "${ClickHouse_BINARY_DIR}/contrib/protobuf")
set(protobuf_WITH_ZLIB 0 CACHE INTERNAL "" FORCE) # actually will use zlib, but skip find
set(protobuf_BUILD_TESTS OFF CACHE INTERNAL "" FORCE)
if (MAKE_STATIC_LIBRARIES)
set(protobuf_BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
else ()
set(protobuf_BUILD_SHARED_LIBS ON CACHE INTERNAL "" FORCE)
endif ()
add_subdirectory("${protobuf_SOURCE_DIR}/cmake" "${protobuf_BINARY_DIR}")