mirror of https://github.com/ByConity/ByConity
Cmake: fix build without downloaded submodules (#1379)
This commit is contained in:
parent
622bd34505
commit
8dd5c9dac2
|
@ -1,5 +1,10 @@
|
|||
option (USE_INTERNAL_POCO_LIBRARY "Set to FALSE to use system poco library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/poco/CMakeLists.txt")
|
||||
message (WARNING "submodule contrib/poco is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (USE_INTERNAL_POCO_LIBRARY 0)
|
||||
endif ()
|
||||
|
||||
if (NOT USE_INTERNAL_POCO_LIBRARY)
|
||||
find_package (Poco COMPONENTS Net NetSSL XML Data Crypto DataODBC MongoDB)
|
||||
endif ()
|
||||
|
|
|
@ -4,6 +4,12 @@ if (ENABLE_RDKAFKA)
|
|||
|
||||
option (USE_INTERNAL_RDKAFKA_LIBRARY "Set to FALSE to use system librdkafka instead of the bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/librdkafka/CMakeLists.txt")
|
||||
message (WARNING "submodule contrib/librdkafka is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (USE_INTERNAL_RDKAFKA_LIBRARY 0)
|
||||
set (MISSING_INTERNAL_RDKAFKA_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
if (NOT USE_INTERNAL_RDKAFKA_LIBRARY)
|
||||
find_library (RDKAFKA_LIBRARY rdkafka)
|
||||
find_path (RDKAFKA_INCLUDE_DIR NAMES librdkafka/rdkafka.h PATHS ${RDKAFKA_INCLUDE_PATHS})
|
||||
|
@ -11,14 +17,14 @@ endif ()
|
|||
|
||||
if (RDKAFKA_LIBRARY AND RDKAFKA_INCLUDE_DIR)
|
||||
include_directories (${RDKAFKA_INCLUDE_DIR})
|
||||
else ()
|
||||
set (USE_RDKAFKA 1)
|
||||
elseif (NOT MISSING_INTERNAL_RDKAFKA_LIBRARY)
|
||||
set (USE_INTERNAL_RDKAFKA_LIBRARY 1)
|
||||
set (RDKAFKA_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/librdkafka/src")
|
||||
set (RDKAFKA_LIBRARY rdkafka)
|
||||
set (USE_RDKAFKA 1)
|
||||
endif ()
|
||||
|
||||
set (USE_RDKAFKA 1)
|
||||
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using librdkafka=${USE_RDKAFKA}: ${RDKAFKA_INCLUDE_DIR} : ${RDKAFKA_LIBRARY}")
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
option (USE_INTERNAL_ZOOKEEPER_LIBRARY "Set to FALSE to use system zookeeper library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/zookeeper/src/c/CMakeLists.txt")
|
||||
message (WARNING "submodule contrib/zookeeper is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (USE_INTERNAL_ZOOKEEPER_LIBRARY 0)
|
||||
endif ()
|
||||
|
||||
if (NOT USE_INTERNAL_ZOOKEEPER_LIBRARY)
|
||||
find_library (ZOOKEEPER_LIBRARY zookeeper_mt)
|
||||
find_path (ZOOKEEPER_INCLUDE_DIR NAMES zookeeper/zookeeper.h PATHS ${ZOOKEEPER_INCLUDE_PATHS})
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#include <Common/isLocalAddress.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <Core/Types.h>
|
||||
#include <Poco/Util/Application.h>
|
||||
#include <Poco/Net/NetworkInterface.h>
|
||||
#include <Poco/Net/SocketAddress.h>
|
||||
|
||||
#include <Common/isLocalAddress.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue