From da36856d852e3792cfd6836f8dda086a3aaeaf82 Mon Sep 17 00:00:00 2001 From: Matthew Albrecht Date: Thu, 26 Mar 2020 11:39:51 -0500 Subject: [PATCH] Only find zlib if it has not already been found. (#169) --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba8de2bd..a3f40c3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,7 +200,9 @@ if (USE_TLS AND USE_MBED_TLS) endif() endif() -find_package(ZLIB) +if (NOT ZLIB_FOUND) + find_package(ZLIB) +endif() if (ZLIB_FOUND) include_directories(${ZLIB_INCLUDE_DIRS}) target_link_libraries(ixwebsocket ${ZLIB_LIBRARIES})