[1505] | 1 | # - Find zlib |
---|
| 2 | # Find the native ZLIB includes and library |
---|
| 3 | # |
---|
| 4 | # ZLIB_INCLUDE_DIR - where to find zlib.h, etc. |
---|
[1776] | 5 | # ZLIB_LIBRARY - List of libraries when using zlib. |
---|
[1505] | 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 | # |
---|
[1776] | 11 | # Several changes and additions by Fabian 'x3n' Landau |
---|
| 12 | # > www.orxonox.net < |
---|
[1505] | 13 | |
---|
[1776] | 14 | IF (ZLIB_INCLUDE_DIR) |
---|
| 15 | SET(ZLIB_FIND_QUIETLY TRUE) |
---|
| 16 | ENDIF (ZLIB_INCLUDE_DIR) |
---|
| 17 | |
---|
[1505] | 18 | IF(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 | ) |
---|
| 30 | ENDIF(UNIX) |
---|
| 31 | |
---|
| 32 | IF(WIN32) |
---|
[1776] | 33 | IF(EXISTS "../libs/zlib") |
---|
| 34 | SET (ZLIB_LIBRARY_DIR "../libs/zlib") |
---|
| 35 | ENDIF(EXISTS "../libs/zlib") |
---|
[1505] | 36 | |
---|
| 37 | FIND_PATH(ZLIB_INCLUDE_DIR zlib.h |
---|
[1776] | 38 | ../libs/zlib/include |
---|
[1505] | 39 | ) |
---|
| 40 | |
---|
| 41 | FIND_LIBRARY(ZLIB_LIBRARY |
---|
| 42 | NAMES zlib |
---|
| 43 | PATHS ${ZLIB_LIBRARY_DIR} |
---|
| 44 | ) |
---|
[1776] | 45 | ENDIF(WIN32) |
---|
[1505] | 46 | |
---|
[1776] | 47 | SET(ZLIB_FOUND FALSE) |
---|
| 48 | IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY) |
---|
| 49 | SET(ZLIB_FOUND TRUE) |
---|
| 50 | ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY) |
---|
| 51 | |
---|
| 52 | IF (ZLIB_FOUND) |
---|
| 53 | IF (NOT ZLIB_FIND_QUIETLY) |
---|
| 54 | MESSAGE(STATUS "ZLIB was found.") |
---|
| 55 | IF (VERBOSE_FIND) |
---|
| 56 | MESSAGE (STATUS " include path: ${ZLIB_INCLUDE_DIR}") |
---|
| 57 | MESSAGE (STATUS " library path: ${ZLIB_LIBRARY}") |
---|
| 58 | MESSAGE (STATUS " libraries: zlib") |
---|
| 59 | ENDIF (VERBOSE_FIND) |
---|
| 60 | ENDIF (NOT ZLIB_FIND_QUIETLY) |
---|
| 61 | ELSE (ZLIB_FOUND) |
---|
| 62 | IF (NOT ZLIB_INCLUDE_DIR) |
---|
| 63 | MESSAGE(SEND_ERROR "ZLIB include path was not found.") |
---|
| 64 | ENDIF (NOT ZLIB_INCLUDE_DIR) |
---|
| 65 | IF (NOT ZLIB_LIBRARY) |
---|
| 66 | MESSAGE(SEND_ERROR "ZLIB was not found.") |
---|
| 67 | MESSAGE(STATUS "Looked for Z libraries named ${ZLIBS_NAMES}.") |
---|
| 68 | ENDIF (NOT ZLIB_LIBRARY) |
---|
| 69 | ENDIF (ZLIB_FOUND) |
---|
| 70 | |
---|
| 71 | MARK_AS_ADVANCED( |
---|
| 72 | ZLIB_LIBRARY |
---|
| 73 | ZLIB_INCLUDE_DIR |
---|
| 74 | ) |
---|