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})