2017-02-28 23:49:04 +00:00
|
|
|
option (USE_INTERNAL_POCO_LIBRARY "Set to FALSE to use system poco library instead of bundled" ${NOT_UNBUNDLED})
|
2017-02-06 20:30:19 +00:00
|
|
|
|
2018-01-18 18:26:36 +00:00
|
|
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/poco/CMakeLists.txt")
|
|
|
|
if (USE_INTERNAL_POCO_LIBRARY)
|
|
|
|
message (WARNING "submodule contrib/poco is missing. to fix try run: \n git submodule update --init --recursive")
|
|
|
|
endif ()
|
2017-10-20 17:59:44 +00:00
|
|
|
set (USE_INTERNAL_POCO_LIBRARY 0)
|
2018-01-18 18:26:36 +00:00
|
|
|
set (MISSING_INTERNAL_POCO_LIBRARY 1)
|
2017-10-20 17:59:44 +00:00
|
|
|
endif ()
|
|
|
|
|
2018-05-14 18:36:01 +00:00
|
|
|
set (POCO_COMPONENTS Net XML SQL Data)
|
|
|
|
if (NOT DEFINED ENABLE_POCO_NETSSL OR ENABLE_POCO_NETSSL)
|
|
|
|
list (APPEND POCO_COMPONENTS Crypto NetSSL)
|
|
|
|
endif ()
|
|
|
|
if (NOT DEFINED ENABLE_POCO_MONGODB OR ENABLE_POCO_MONGODB)
|
2019-07-19 15:34:17 +00:00
|
|
|
set(ENABLE_POCO_MONGODB 1 CACHE BOOL "")
|
2018-05-14 18:36:01 +00:00
|
|
|
list (APPEND POCO_COMPONENTS MongoDB)
|
2019-07-19 15:34:17 +00:00
|
|
|
else ()
|
|
|
|
set(ENABLE_POCO_MONGODB 0 CACHE BOOL "")
|
2018-05-14 18:36:01 +00:00
|
|
|
endif ()
|
|
|
|
# TODO: after new poco release with SQL library rename ENABLE_POCO_ODBC -> ENABLE_POCO_SQLODBC
|
|
|
|
if (NOT DEFINED ENABLE_POCO_ODBC OR ENABLE_POCO_ODBC)
|
|
|
|
list (APPEND POCO_COMPONENTS DataODBC)
|
2018-09-14 19:48:51 +00:00
|
|
|
list (APPEND POCO_COMPONENTS SQLODBC)
|
2018-05-14 18:36:01 +00:00
|
|
|
endif ()
|
|
|
|
|
2017-02-07 21:28:13 +00:00
|
|
|
if (NOT USE_INTERNAL_POCO_LIBRARY)
|
2018-05-14 18:36:01 +00:00
|
|
|
find_package (Poco COMPONENTS ${POCO_COMPONENTS})
|
2017-02-06 20:30:19 +00:00
|
|
|
endif ()
|
|
|
|
|
2017-03-28 20:30:57 +00:00
|
|
|
if (Poco_INCLUDE_DIRS AND Poco_Foundation_LIBRARY)
|
2018-01-18 18:26:36 +00:00
|
|
|
elseif (NOT MISSING_INTERNAL_POCO_LIBRARY)
|
2017-04-01 07:20:54 +00:00
|
|
|
set (USE_INTERNAL_POCO_LIBRARY 1)
|
2017-04-19 00:21:16 +00:00
|
|
|
|
2017-10-13 18:58:19 +00:00
|
|
|
set (ENABLE_ZIP 0 CACHE BOOL "")
|
|
|
|
set (ENABLE_PAGECOMPILER 0 CACHE BOOL "")
|
|
|
|
set (ENABLE_PAGECOMPILER_FILE2PAGE 0 CACHE BOOL "")
|
|
|
|
set (ENABLE_REDIS 0 CACHE BOOL "")
|
|
|
|
set (ENABLE_DATA_SQLITE 0 CACHE BOOL "")
|
|
|
|
set (ENABLE_DATA_MYSQL 0 CACHE BOOL "")
|
|
|
|
set (ENABLE_DATA_POSTGRESQL 0 CACHE BOOL "")
|
2019-04-11 17:20:36 +00:00
|
|
|
set (ENABLE_ENCODINGS 0 CACHE BOOL "")
|
2019-07-19 15:34:17 +00:00
|
|
|
set (ENABLE_MONGODB ${ENABLE_POCO_MONGODB} CACHE BOOL "" FORCE)
|
2019-04-11 17:20:36 +00:00
|
|
|
|
2018-04-03 11:48:40 +00:00
|
|
|
# new after 2.0.0:
|
|
|
|
set (POCO_ENABLE_ZIP 0 CACHE BOOL "")
|
|
|
|
set (POCO_ENABLE_PAGECOMPILER 0 CACHE BOOL "")
|
|
|
|
set (POCO_ENABLE_PAGECOMPILER_FILE2PAGE 0 CACHE BOOL "")
|
|
|
|
set (POCO_ENABLE_REDIS 0 CACHE BOOL "")
|
|
|
|
set (POCO_ENABLE_SQL_SQLITE 0 CACHE BOOL "")
|
|
|
|
set (POCO_ENABLE_SQL_MYSQL 0 CACHE BOOL "")
|
|
|
|
set (POCO_ENABLE_SQL_POSTGRESQL 0 CACHE BOOL "")
|
|
|
|
|
2017-10-13 18:58:19 +00:00
|
|
|
set (POCO_UNBUNDLED 1 CACHE BOOL "")
|
|
|
|
set (POCO_UNBUNDLED_PCRE 0 CACHE BOOL "")
|
|
|
|
set (POCO_UNBUNDLED_EXPAT 0 CACHE BOOL "")
|
|
|
|
set (POCO_STATIC ${MAKE_STATIC_LIBRARIES} CACHE BOOL "")
|
|
|
|
set (POCO_VERBOSE_MESSAGES 1 CACHE BOOL "")
|
|
|
|
|
2017-04-19 00:21:16 +00:00
|
|
|
|
2017-10-13 18:58:19 +00:00
|
|
|
# used in internal compiler
|
2017-04-19 00:21:16 +00:00
|
|
|
list (APPEND Poco_INCLUDE_DIRS
|
2017-10-13 18:58:19 +00:00
|
|
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/Foundation/include/"
|
|
|
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/Util/include/"
|
2017-04-01 07:20:54 +00:00
|
|
|
)
|
2017-01-13 11:25:44 +00:00
|
|
|
|
2019-07-19 15:34:17 +00:00
|
|
|
if (ENABLE_POCO_MONGODB)
|
2017-04-19 00:21:16 +00:00
|
|
|
set (Poco_MongoDB_LIBRARY PocoMongoDB)
|
2018-09-14 19:48:51 +00:00
|
|
|
set (Poco_MongoDB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/poco/MongoDB/include/")
|
2017-04-19 00:21:16 +00:00
|
|
|
endif ()
|
|
|
|
|
2018-04-09 13:52:39 +00:00
|
|
|
if (EXISTS "${ClickHouse_SOURCE_DIR}/contrib/poco/SQL/ODBC/include/")
|
|
|
|
set (Poco_SQL_FOUND 1)
|
|
|
|
set (Poco_SQL_LIBRARY PocoSQL)
|
2018-09-14 19:48:51 +00:00
|
|
|
set (Poco_SQL_INCLUDE_DIR
|
2018-04-09 13:52:39 +00:00
|
|
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/SQL/include"
|
|
|
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/Data/include"
|
|
|
|
)
|
2018-09-14 19:48:51 +00:00
|
|
|
if ((NOT DEFINED POCO_ENABLE_SQL_ODBC OR POCO_ENABLE_SQL_ODBC) AND ODBC_FOUND)
|
|
|
|
set (Poco_SQLODBC_INCLUDE_DIR
|
2018-04-03 11:48:40 +00:00
|
|
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/SQL/ODBC/include/"
|
|
|
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/Data/ODBC/include/"
|
2019-04-24 21:33:04 +00:00
|
|
|
${ODBC_INCLUDE_DIRS}
|
2018-04-03 11:48:40 +00:00
|
|
|
)
|
|
|
|
set (Poco_SQLODBC_LIBRARY PocoSQLODBC ${ODBC_LIBRARIES} ${LTDL_LIBRARY})
|
2018-04-09 13:52:39 +00:00
|
|
|
endif ()
|
|
|
|
else ()
|
|
|
|
set (Poco_Data_FOUND 1)
|
2018-09-14 19:48:51 +00:00
|
|
|
set (Poco_Data_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/poco/Data/include")
|
2018-04-09 13:52:39 +00:00
|
|
|
set (Poco_Data_LIBRARY PocoData)
|
2018-09-14 19:48:51 +00:00
|
|
|
if ((NOT DEFINED ENABLE_DATA_ODBC OR ENABLE_DATA_ODBC) AND ODBC_FOUND)
|
2018-05-14 18:36:01 +00:00
|
|
|
set (USE_POCO_DATAODBC 1)
|
2018-09-14 19:48:51 +00:00
|
|
|
set (Poco_DataODBC_INCLUDE_DIR
|
2018-04-09 13:52:39 +00:00
|
|
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/Data/ODBC/include/"
|
2019-04-24 21:33:04 +00:00
|
|
|
${ODBC_INCLUDE_DIRS}
|
2018-04-09 13:52:39 +00:00
|
|
|
)
|
2018-04-03 11:48:40 +00:00
|
|
|
set (Poco_DataODBC_LIBRARY PocoDataODBC ${ODBC_LIBRARIES} ${LTDL_LIBRARY})
|
|
|
|
endif ()
|
2017-04-19 00:21:16 +00:00
|
|
|
endif ()
|
|
|
|
|
2018-08-05 08:40:31 +00:00
|
|
|
if (OPENSSL_FOUND AND (NOT DEFINED ENABLE_POCO_NETSSL OR ENABLE_POCO_NETSSL))
|
2018-11-21 19:20:27 +00:00
|
|
|
set (Poco_NetSSL_LIBRARY PocoNetSSL ${OPENSSL_LIBRARIES})
|
|
|
|
set (Poco_Crypto_LIBRARY PocoCrypto ${OPENSSL_LIBRARIES})
|
2017-04-19 00:21:16 +00:00
|
|
|
endif ()
|
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
if (USE_STATIC_LIBRARIES AND USE_INTERNAL_ZLIB_LIBRARY)
|
2017-04-19 00:21:16 +00:00
|
|
|
list (APPEND Poco_INCLUDE_DIRS
|
2018-03-02 00:17:25 +00:00
|
|
|
"${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}/"
|
|
|
|
"${ClickHouse_BINARY_DIR}/contrib/${INTERNAL_ZLIB_NAME}/"
|
2017-04-19 00:21:16 +00:00
|
|
|
)
|
2017-04-01 07:20:54 +00:00
|
|
|
endif ()
|
2017-01-13 11:25:44 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
set (Poco_Foundation_LIBRARY PocoFoundation)
|
|
|
|
set (Poco_Util_LIBRARY PocoUtil)
|
|
|
|
set (Poco_Net_LIBRARY PocoNet)
|
2017-04-19 00:21:16 +00:00
|
|
|
set (Poco_XML_LIBRARY PocoXML)
|
2017-01-13 11:25:44 +00:00
|
|
|
endif ()
|
|
|
|
|
2018-05-17 17:55:07 +00:00
|
|
|
if (Poco_NetSSL_LIBRARY AND Poco_Crypto_LIBRARY)
|
|
|
|
set (USE_POCO_NETSSL 1)
|
|
|
|
endif ()
|
|
|
|
if (Poco_MongoDB_LIBRARY)
|
|
|
|
set (USE_POCO_MONGODB 1)
|
|
|
|
endif ()
|
2018-10-25 15:23:41 +00:00
|
|
|
if (Poco_DataODBC_LIBRARY AND ODBC_FOUND)
|
2018-05-17 17:55:07 +00:00
|
|
|
set (USE_POCO_DATAODBC 1)
|
|
|
|
endif ()
|
2018-10-25 15:23:41 +00:00
|
|
|
if (Poco_SQLODBC_LIBRARY AND ODBC_FOUND)
|
2018-05-17 17:55:07 +00:00
|
|
|
set (USE_POCO_SQLODBC 1)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
message(STATUS "Using Poco: ${Poco_INCLUDE_DIRS} : ${Poco_Foundation_LIBRARY},${Poco_Util_LIBRARY},${Poco_Net_LIBRARY},${Poco_NetSSL_LIBRARY},${Poco_Crypto_LIBRARY},${Poco_XML_LIBRARY},${Poco_Data_LIBRARY},${Poco_DataODBC_LIBRARY},${Poco_SQL_LIBRARY},${Poco_SQLODBC_LIBRARY},${Poco_MongoDB_LIBRARY}; MongoDB=${USE_POCO_MONGODB}, DataODBC=${USE_POCO_DATAODBC}, NetSSL=${USE_POCO_NETSSL}")
|
2017-10-13 18:58:19 +00:00
|
|
|
|
|
|
|
# How to make sutable poco:
|
|
|
|
# use branch:
|
|
|
|
# develop OR poco-1.7.9-release + 6a49c94d18c654d7a20b8c8ea47071b1fdd4813b
|
|
|
|
# and merge:
|
|
|
|
# ClickHouse-Extras/clickhouse_unbundled
|
|
|
|
# ClickHouse-Extras/clickhouse_unbundled_zlib
|
2017-11-02 14:14:16 +00:00
|
|
|
# ClickHouse-Extras/clickhouse_task
|
2017-10-13 18:58:19 +00:00
|
|
|
# ClickHouse-Extras/clickhouse_misc
|
|
|
|
# ClickHouse-Extras/clickhouse_anl
|
|
|
|
# ClickHouse-Extras/clickhouse_http_header https://github.com/pocoproject/poco/pull/1574
|
|
|
|
# ClickHouse-Extras/clickhouse_socket
|
|
|
|
# ClickHouse-Extras/clickhouse_warning
|
2017-11-02 14:14:16 +00:00
|
|
|
# ClickHouse-Extras/clickhouse-purge-logs-on-no-space
|
|
|
|
# ClickHouse-Extras/clickhouse_freebsd
|
2018-04-06 11:28:29 +00:00
|
|
|
# ClickHouse-Extras/clikhouse_no_zlib
|
|
|
|
# ClickHouse-Extras/clickhouse-fix-atomic
|