From: Azat Khuzhin Date: Tue, 9 Aug 2016 07:56:34 +0000 (+0300) Subject: cmake: check for ZLIB_INCLUDE_DIR, since we can have only library without headers X-Git-Tag: release-2.1.6-beta~15^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4dfb93ff2bfdd1b76f3e9f402c28528e5bc24bf;p=libevent cmake: check for ZLIB_INCLUDE_DIR, since we can have only library without headers --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b857d377..cad9d57b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -702,7 +702,7 @@ if (NOT EVENT__DISABLE_TESTS) # Zlib is only used for testing. find_package(ZLIB) - if (ZLIB_LIBRARY) + if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR) include_directories(${ZLIB_INCLUDE_DIRS}) set(EVENT__HAVE_ZLIB 1) @@ -982,7 +982,7 @@ if (NOT EVENT__DISABLE_TESTS) list(APPEND SRC_REGRESS test/regress_thread.c) endif() - if (ZLIB_LIBRARY) + if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR) list(APPEND SRC_REGRESS test/regress_zlib.c) endif()