ClickHouse/cmake/find_zlib.cmake
proller f87ae6808f cmake: USE_INTERNAL_ZLIB_LIBRARY (#463)
* Correct fix of building with external poco with disabled sending progress

    Revert "Removed wrong code [#CLICKHOUSE-2]."

    This reverts commit 33f9917f53.

* fix

* fix

* cmake: USE_INTERNAL_ZLIB_LIBRARY
2017-02-08 01:28:13 +04:00

20 lines
468 B
CMake

if (NOT USE_INTERNAL_ZLIB_LIBRARY)
find_package (ZLIB)
if (ZLIB_FOUND)
include_directories (${ZLIB_INCLUDE_DIRS})
endif ()
endif ()
if (NOT ZLIB_FOUND)
set (ZLIB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libzlib-ng")
include_directories (BEFORE ${ZLIB_INCLUDE_DIR})
if (USE_STATIC_LIBRARIES)
set (ZLIB_LIBRARIES zlibstatic)
else ()
set (ZLIB_LIBRARIES zlib)
endif ()
endif ()
message (STATUS "Using zlib: ${ZLIB_INCLUDE_DIR} : ${ZLIB_LIBRARIES}")