5 set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
8 # Already in cache, be silent
9 set(ZLIB_FIND_QUIETLY TRUE)
12 find_path(ZLIB_INCLUDE_DIR zlib.h
16 set(POTENTIAL_Z_LIBS z zlib zdll)
18 find_library(ZLIB_LIBRARY NAMES ${POTENTIAL_Z_LIBS}
19 PATHS "C:\\Programme\\Microsoft Visual Studio 8\\VC\\lib"
20 /usr/lib /usr/local/lib)
22 if(ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
27 if(NOT ZLIB_FIND_QUIETLY)
28 message(STATUS "Found Z: ${ZLIB_LIBRARY}")
31 if(ZLIB_FIND_REQUIRED)
32 message(STATUS "Looked for Z libraries named ${POTENTIAL_Z_LIBS}.")
33 message(STATUS "Found no acceptable Z library. This is fatal.")
34 message(FATAL_ERROR "Could NOT find z library")
38 mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)