Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/physics/cmake/FindZLIB.cmake @ 2103

Last change on this file since 2103 was 1872, checked in by rgrieder, 16 years ago
  • Modified cmake files to support library finding when using Visual Studio precompiled dependencies
  • Removed vorbisenc executable from library dependency
  • Property svn:eol-style set to native
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_LIBRARY     - 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# Several changes and additions by Fabian 'x3n' Landau
12#                 > www.orxonox.net <
13
14IF (ZLIB_INCLUDE_DIR)
15  SET(ZLIB_FIND_QUIETLY TRUE)
16ENDIF (ZLIB_INCLUDE_DIR)
17
18IF(UNIX)
19  FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
20    /usr/pack/zziplib-0.13.49-sd/include/
21    /usr/local/include
22    /usr/include
23  )
24
25  SET(ZLIB_NAMES z zlib zdll)
26  FIND_LIBRARY(ZLIB_LIBRARY
27    NAMES ${ZLIB_NAMES}
28    PATHS /usr/pack/zziplib-0.13.49-sd/i686-debian-linux3.1/lib/ /usr/lib /usr/local/lib
29  )
30ENDIF(UNIX)
31
32IF(WIN32)
33  IF(EXISTS "../libs/zlib")
34    SET (ZLIB_LIBRARY_DIR "../libs/zlib")
35  ENDIF(EXISTS "../libs/zlib")
36
37  FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
38    ../libs/zlib/include
39    ${DEPENDENCY_DIR}/zlib-1.2.3/include
40  )
41
42  FIND_LIBRARY(ZLIB_LIBRARY
43    NAMES zlib
44    PATHS ${ZLIB_LIBRARY_DIR}
45    ${DEPENDENCY_DIR}/zlib-1.2.3/lib
46  )
47ENDIF(WIN32)
48
49SET(ZLIB_FOUND FALSE)
50IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
51  SET(ZLIB_FOUND TRUE)
52ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
53
54IF (ZLIB_FOUND)
55  IF (NOT ZLIB_FIND_QUIETLY)
56    MESSAGE(STATUS "ZLIB was found.")
57    IF (VERBOSE_FIND)
58      MESSAGE (STATUS "  include path: ${ZLIB_INCLUDE_DIR}")
59      MESSAGE (STATUS "  library path: ${ZLIB_LIBRARY}")
60      MESSAGE (STATUS "  libraries:    zlib")
61    ENDIF (VERBOSE_FIND)
62  ENDIF (NOT ZLIB_FIND_QUIETLY)
63ELSE (ZLIB_FOUND)
64  IF (NOT ZLIB_INCLUDE_DIR)
65    MESSAGE(SEND_ERROR "ZLIB include path was not found.")
66  ENDIF (NOT ZLIB_INCLUDE_DIR)
67  IF (NOT ZLIB_LIBRARY)
68    MESSAGE(SEND_ERROR "ZLIB was not found.")
69    MESSAGE(STATUS "Looked for Z libraries named ${ZLIBS_NAMES}.")
70  ENDIF (NOT ZLIB_LIBRARY)
71ENDIF (ZLIB_FOUND)
72
73MARK_AS_ADVANCED(
74  ZLIB_LIBRARY
75  ZLIB_INCLUDE_DIR
76)
Note: See TracBrowser for help on using the repository browser.