Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/releases/0.1.0/cmake/FindZLIB.cmake @ 2467

Last change on this file since 2467 was 790, checked in by nicolasc, 17 years ago

merged FICN back into trunk
awaiting release.

File size: 1.9 KB
Line 
1# - Find zlib
2# Find the native ZLIB includes and library
3#
4#  ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
5#  ZLIB_LIBRARIES   - List of libraries when using zlib.
6#  ZLIB_FOUND       - True if zlib found.
7#
8#  Modified by Nicolas Schlumberger, (c) 2007
9#  to make it work on the Tardis Infrastucture of the ETH Zurich
10#
11
12IF(UNIX)
13  IF (ZLIB_INCLUDE_DIR)
14  # Already in cache, be silent
15    SET(ZLIB_FIND_QUIETLY TRUE)
16  ENDIF (ZLIB_INCLUDE_DIR)
17
18  FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
19    /usr/pack/zziplib-0.13.49-sd/include/
20    /usr/local/include
21    /usr/include
22  )
23
24  SET(ZLIB_NAMES z zlib zdll)
25  FIND_LIBRARY(ZLIB_LIBRARY
26    NAMES ${ZLIB_NAMES}
27    PATHS /usr/pack/zziplib-0.13.49-sd/i686-debian-linux3.1/lib/ /usr/lib /usr/local/lib
28  )
29
30  IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
31    SET(ZLIB_FOUND TRUE)
32      SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
33  ELSE (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
34    SET(ZLIB_FOUND FALSE)
35    SET( ZLIB_LIBRARIES )
36  ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
37
38  IF (ZLIB_FOUND)
39    IF (NOT ZLIB_FIND_QUIETLY)
40      MESSAGE(STATUS "Found ZLIB: ${ZLIB_LIBRARY}")
41    ENDIF (NOT ZLIB_FIND_QUIETLY)
42  ELSE (ZLIB_FOUND)
43    IF (ZLIB_FIND_REQUIRED)
44        MESSAGE(STATUS "Looked for Z libraries named ${ZLIBS_NAMES}.")
45        MESSAGE(FATAL_ERROR "Could NOT find z library")
46    ENDIF (ZLIB_FIND_REQUIRED)
47  ENDIF (ZLIB_FOUND)
48
49  MARK_AS_ADVANCED(
50    ZLIB_LIBRARY
51    ZLIB_INCLUDE_DIR
52  )
53ENDIF(UNIX)
54
55IF(WIN32)
56  IF(EXISTS "../libs/ogre/Dependencies/lib/Release")
57    SET (ZLIB_LIBRARY_DIR "../libs/ogre/Dependencies/lib/Release")
58  ENDIF(EXISTS "../libs/ogre/Dependencies/lib/Release")
59
60  FIND_LIBRARY(ZLIB_LIBRARY
61    NAMES zlib
62    PATHS ${ZLIB_LIBRARY_DIR}
63  )
64
65  IF(ZLIB_LIBRARY)
66    MESSAGE(STATUS "Zlib was found.")
67  ELSE(ZLIB_LIBRARY)
68    MESSAGE(FATAL_ERROR "Zlib was NOT found.")
69  ENDIF(ZLIB_LIBRARY)
70ENDIF(WIN32)
Note: See TracBrowser for help on using the repository browser.