From c4dfb93ff2bfdd1b76f3e9f402c28528e5bc24bf Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 9 Aug 2016 10:56:34 +0300 Subject: [PATCH] cmake: check for ZLIB_INCLUDE_DIR, since we can have only library without headers --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() -- 2.50.1