From 820a0a79c092957b4711043ec6c4c3e6362919fd Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 23 May 2006 20:21:04 +0000 Subject: 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 --- modules/FindGIF.cmake | 5 ++++- modules/FindZLIB.cmake | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'modules') 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) -- cgit v1.2.1