2020-08-14 10:29:51 +00:00
|
|
|
set(protobuf_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/protobuf")
|
|
|
|
set(protobuf_BINARY_DIR "${ClickHouse_BINARY_DIR}/contrib/protobuf")
|
2020-05-22 20:45:13 +00:00
|
|
|
|
|
|
|
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 ()
|
|
|
|
|
2020-08-14 10:29:51 +00:00
|
|
|
add_subdirectory("${protobuf_SOURCE_DIR}/cmake" "${protobuf_BINARY_DIR}")
|
2020-09-23 20:20:59 +00:00
|
|
|
|
|
|
|
# We don't want to stop compilation on warnings in protobuf's headers.
|
|
|
|
# The following line overrides the value assigned by the command target_include_directories() in libprotobuf.cmake
|
2021-04-24 19:47:52 +00:00
|
|
|
set_property(TARGET libprotobuf PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${protobuf_SOURCE_DIR}/src")
|