]> git.lyx.org Git - lyx.git/blob - development/cmake/modules/FindZLIB.cmake
use more unicode in math
[lyx.git] / development / cmake / modules / FindZLIB.cmake
1 #
2 #  based on cmake file
3 #
4 if (ZLIB_INCLUDE_DIR)
5   # Already in cache, be silent
6   set(ZLIB_FIND_QUIETLY TRUE)
7 endif (ZLIB_INCLUDE_DIR)
8
9 FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
10  /usr/include
11  /usr/local/include
12 )
13
14 set(POTENTIAL_Z_LIBS z zlib zdll)
15 FIND_LIBRARY(ZLIB_LIBRARY NAMES ${POTENTIAL_Z_LIBS}
16 PATHS
17  "C:\\Programme\\Microsoft Visual Studio 8\\VC\\lib"
18  /usr/lib
19  /usr/local/lib
20 )
21
22 IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
23    SET(ZLIB_FOUND TRUE)
24 ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
25
26 IF (ZLIB_FOUND)
27    IF (NOT ZLIB_FIND_QUIETLY)
28       MESSAGE(STATUS "Found Z: ${ZLIB_LIBRARY}")
29    ENDIF (NOT ZLIB_FIND_QUIETLY)
30 ELSE (ZLIB_FOUND)
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")
35    ENDIF (ZLIB_FIND_REQUIRED)
36 ENDIF (ZLIB_FOUND)
37
38 MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)