diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-06-09 19:33:14 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-06-09 19:33:14 +0000 |
commit | 771c2ddc90cbf250466c89ee558b884a67b5f615 (patch) | |
tree | b75ae996d474754b72c58df500b808a336d44cda | |
parent | 2a0a50c67f79208f3b9e85e61c268e63446152fc (diff) | |
download | extra-cmake-modules-771c2ddc90cbf250466c89ee558b884a67b5f615.tar.gz extra-cmake-modules-771c2ddc90cbf250466c89ee558b884a67b5f615.tar.bz2 |
apply patch from Peter Kuemmel
Alex
svn path=/trunk/KDE/kdelibs/; revision=549759
-rw-r--r-- | modules/FindZLIB.cmake | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/modules/FindZLIB.cmake b/modules/FindZLIB.cmake index b1d6d098..91cc675e 100644 --- a/modules/FindZLIB.cmake +++ b/modules/FindZLIB.cmake @@ -1,23 +1,34 @@ -if (ZLIB_INCLUDE_DIR) +# - Try to find a z compression library +# under Windows the zlib exists with a variety of slightly different names +# Once done this will define +# +# ZLIB_FOUND - system has zlib +# ZLIB_INCLUDE_DIR - the zlib include directory +# ZLIB_LIBRARY - The libraries needed to use zlib + + +IF (ZLIB_INCLUDE_DIR) # Already in cache, be silent - set(ZLIB_FIND_QUIETLY TRUE) -endif (ZLIB_INCLUDE_DIR) + SET(ZLIB_FIND_QUIETLY TRUE) +ENDIF (ZLIB_INCLUDE_DIR) FIND_PATH(ZLIB_INCLUDE_DIR zlib.h /usr/include /usr/local/include ) -set(POTENTIAL_Z_LIBS z zlib) +SET(POTENTIAL_Z_LIBS z zlib zdll) FIND_LIBRARY(ZLIB_LIBRARY NAMES ${POTENTIAL_Z_LIBS} -PATHS - /usr/lib - /usr/local/lib + PATHS + /usr/lib + /usr/local/lib ) -IF (ZLIB_INCLUDE_DIR) +IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY) SET(ZLIB_FOUND TRUE) -ENDIF (ZLIB_INCLUDE_DIR) +ELSE (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY) + SET(ZLIB_FOUND FALSE) +ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY) IF (ZLIB_FOUND) IF (NOT ZLIB_FIND_QUIETLY) |