aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--modules/FindGIF.cmake5
-rw-r--r--modules/FindZLIB.cmake7
2 files changed, 9 insertions, 3 deletions
diff --git a/modules/FindGIF.cmake b/modules/FindGIF.cmake
index 8ea3043a..0fc4b102 100644
--- a/modules/FindGIF.cmake
+++ b/modules/FindGIF.cmake
@@ -17,7 +17,8 @@ FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
/usr/local/include
)
-FIND_LIBRARY(GIF_LIBRARIES NAMES gif libgif ungif libungif giflib
+set(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib)
+FIND_LIBRARY(GIF_LIBRARIES NAMES ${POTENTIAL_GIF_LIBS}
PATHS
/usr/lib
/usr/local/lib
@@ -33,6 +34,8 @@ if (GIF_FOUND)
endif (NOT GIF_FIND_QUIETLY)
else (GIF_FOUND)
if (GIF_FIND_REQUIRED)
+ message(STATUS "Looked for GIF libraries named ${POTENTIAL_GIF_LIBS}.")
+ message(STATUS "Found no acceptable GIF library. This is fatal.")
message(FATAL_ERROR "Could NOT find GIF")
endif (GIF_FIND_REQUIRED)
endif (GIF_FOUND)
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)