aboutsummaryrefslogtreecommitdiff
path: root/modules/FindZLIB.cmake
diff options
context:
space:
mode:
authorAdriaan de Groot <groot@kde.org>2006-05-23 20:21:04 +0000
committerAdriaan de Groot <groot@kde.org>2006-05-23 20:21:04 +0000
commit820a0a79c092957b4711043ec6c4c3e6362919fd (patch)
tree54316cae5d4b21885064f8593352578d83b37595 /modules/FindZLIB.cmake
parent2594b8f6ce971342f4f5b6ca4abe13c6acf05636 (diff)
downloadextra-cmake-modules-820a0a79c092957b4711043ec6c4c3e6362919fd.tar.gz
extra-cmake-modules-820a0a79c092957b4711043ec6c4c3e6362919fd.tar.bz2
Be just a *tad* more informative on the command-line when an essential dependency is missing (this shows up under a stock Kubuntu install). Tell the user what was missing. This touches on the idea agai nthat we want a standard macro for informing users of missing dependencies.
svn path=/trunk/KDE/kdelibs/; revision=544165
Diffstat (limited to 'modules/FindZLIB.cmake')
-rw-r--r--modules/FindZLIB.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/FindZLIB.cmake b/modules/FindZLIB.cmake
index 2fcfdd15..b1d6d098 100644
--- a/modules/FindZLIB.cmake
+++ b/modules/FindZLIB.cmake
@@ -8,7 +8,8 @@ FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
/usr/local/include
)
-FIND_LIBRARY(ZLIB_LIBRARY NAMES z zlib
+set(POTENTIAL_Z_LIBS z zlib)
+FIND_LIBRARY(ZLIB_LIBRARY NAMES ${POTENTIAL_Z_LIBS}
PATHS
/usr/lib
/usr/local/lib
@@ -24,7 +25,9 @@ IF (ZLIB_FOUND)
ENDIF (NOT ZLIB_FIND_QUIETLY)
ELSE (ZLIB_FOUND)
IF (ZLIB_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find z library")
+ MESSAGE(STATUS "Looked for Z libraries named ${POTENTIAL_Z_LIBS}.")
+ MESSAGE(STATUS "Found no acceptable Z library. This is fatal.")
+ MESSAGE(FATAL_ERROR "Could NOT find z library")
ENDIF (ZLIB_FIND_REQUIRED)
ENDIF (ZLIB_FOUND)