aboutsummaryrefslogtreecommitdiff
path: root/modules/FindCups.cmake
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2006-05-11 16:56:59 +0000
committerDavid Faure <faure@kde.org>2006-05-11 16:56:59 +0000
commita1cd53cff402332c1bcf7a625b33d9330a247608 (patch)
treec1e17c42054778348a4e176e6ec494b0a6068a01 /modules/FindCups.cmake
parentd46f0af3b68dba8e3bb5461c5b5e37862309875d (diff)
downloadextra-cmake-modules-a1cd53cff402332c1bcf7a625b33d9330a247608.tar.gz
extra-cmake-modules-a1cd53cff402332c1bcf7a625b33d9330a247608.tar.bz2
Remove my CACHED_ hacks which break when people install libxml2 after seeing the error
message about it - only use the cache when the check was previously successful, as discussed. svn path=/trunk/KDE/kdelibs/; revision=539759
Diffstat (limited to 'modules/FindCups.cmake')
-rw-r--r--modules/FindCups.cmake14
1 files changed, 5 insertions, 9 deletions
diff --git a/modules/FindCups.cmake b/modules/FindCups.cmake
index 387d82d9..5f63870a 100644
--- a/modules/FindCups.cmake
+++ b/modules/FindCups.cmake
@@ -7,14 +7,12 @@
# CUPS_DEFINITIONS - Compiler switches required for using Cups
#
-IF (DEFINED CACHED_CUPS)
+if (CUPS_INCLUDE_DIR AND CUPS_LIBRARIES)
# in cache already
- IF ("${CACHED_CUPS}" STREQUAL "YES")
- SET(CUPS_FOUND TRUE)
- ENDIF ("${CACHED_CUPS}" STREQUAL "YES")
+ SET(CUPS_FOUND TRUE)
-ELSE (DEFINED CACHED_CUPS)
+else (CUPS_INCLUDE_DIR AND CUPS_LIBRARIES)
FIND_PATH(CUPS_INCLUDE_DIR cups/cups.h
/usr/include
@@ -33,18 +31,16 @@ ELSE (DEFINED CACHED_CUPS)
endif (CUPS_INCLUDE_DIR AND CUPS_LIBRARIES)
if (CUPS_FOUND)
- set (CACHED_CUPS "YES")
if (NOT Cups_FIND_QUIETLY)
message(STATUS "Found Cups: ${CUPS_LIBRARIES}")
endif (NOT Cups_FIND_QUIETLY)
else (CUPS_FOUND)
- set (CACHED_CUPS "NO")
+ set(CUPS_LIBRARIES )
if (Cups_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find Cups")
endif (Cups_FIND_REQUIRED)
endif (CUPS_FOUND)
- set(CACHED_CUPS ${CACHED_CUPS} CACHE INTERNAL "If cups was checked")
MARK_AS_ADVANCED(CUPS_INCLUDE_DIR CUPS_LIBRARIES)
-ENDIF (DEFINED CACHED_CUPS)
+endif (CUPS_INCLUDE_DIR AND CUPS_LIBRARIES)