diff --git a/cmake/find_boost.cmake b/cmake/find_boost.cmake index e9ad4c3d146..1f9e938fa5f 100644 --- a/cmake/find_boost.cmake +++ b/cmake/find_boost.cmake @@ -13,6 +13,7 @@ if (NOT USE_INTERNAL_BOOST_LIBRARY) endif () if (NOT Boost_SYSTEM_LIBRARY) + set (USE_INTERNAL_BOOST_LIBRARY 1) set (Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options_internal) set (Boost_SYSTEM_LIBRARY boost_system_internal) set (Boost_FILESYSTEM_LIBRARY boost_filesystem_internal) diff --git a/cmake/find_gperftools.cmake b/cmake/find_gperftools.cmake index 36abb2847f1..f66d78ef2c5 100644 --- a/cmake/find_gperftools.cmake +++ b/cmake/find_gperftools.cmake @@ -6,12 +6,13 @@ if (ENABLE_LIBTCMALLOC) endif () if (NOT (GPERFTOOLS_INCLUDE_DIR AND GPERFTOOLS_TCMALLOC_MINIMAL)) - set(GPERFTOOLS_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libtcmalloc/include") - set(GPERFTOOLS_TCMALLOC_MINIMAL tcmalloc_minimal_internal) + set (USE_INTERNAL_GPERFTOOLS_LIBRARY 1) + set (GPERFTOOLS_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libtcmalloc/include") + set (GPERFTOOLS_TCMALLOC_MINIMAL tcmalloc_minimal_internal) include_directories (BEFORE ${GPERFTOOLS_INCLUDE_DIR}) endif () set (USE_TCMALLOC 1) - message(STATUS "Using tcmalloc=${USE_TCMALLOC}: ${GPERFTOOLS_INCLUDE_DIR} : ${GPERFTOOLS_TCMALLOC_MINIMAL}") + message (STATUS "Using tcmalloc=${USE_TCMALLOC}: ${GPERFTOOLS_INCLUDE_DIR} : ${GPERFTOOLS_TCMALLOC_MINIMAL}") endif () diff --git a/cmake/find_poco.cmake b/cmake/find_poco.cmake index 63c067395e4..614a213d203 100644 --- a/cmake/find_poco.cmake +++ b/cmake/find_poco.cmake @@ -1,12 +1,13 @@ if (NOT USE_INTERNAL_POCO_LIBRARY) - find_package (Poco REQUIRED Util Net XML Data Crypto DataODBC MongoDB Foundation) + find_package (Poco COMPONENTS Net XML Data Crypto DataODBC MongoDB) if (Poco_INCLUDE_DIRS) include_directories (${Poco_INCLUDE_DIRS}) endif () endif () if (NOT (Poco_INCLUDE_DIRS AND Poco_Foundation_LIBRARY AND Poco_MongoDB_LIBRARY AND Poco_DataODBC_LIBRARY)) + set (USE_INTERNAL_POCO_LIBRARY 1) set (Poco_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/libpoco/Foundation/include/" "${ClickHouse_SOURCE_DIR}/contrib/libpoco/Util/include/" diff --git a/cmake/find_zlib.cmake b/cmake/find_zlib.cmake index 5a611be59d6..a3f2641f462 100644 --- a/cmake/find_zlib.cmake +++ b/cmake/find_zlib.cmake @@ -1,12 +1,12 @@ if (NOT USE_INTERNAL_ZLIB_LIBRARY) find_package (ZLIB) - if (ZLIB_FOUND) include_directories (${ZLIB_INCLUDE_DIRS}) endif () endif () if (NOT ZLIB_FOUND) + set (USE_INTERNAL_ZLIB_LIBRARY 1) set (ZLIB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libzlib-ng") include_directories (BEFORE ${ZLIB_INCLUDE_DIR}) if (USE_STATIC_LIBRARIES)