From 177f99bb0f07bce10bca0a09cf3cc9880dd66007 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 21 Aug 2007 07:26:30 +0000 Subject: [PATCH] Minor fix Use FIND_PACKAGE_HANDLE_STANDARD_ARGS svn path=/trunk/KDE/kdegraphics/cmake/modules/; revision=702793 --- cmake/modules/FindDjVuLibre.cmake | 17 +++-------------- cmake/modules/FindKadmos.cmake | 4 ++-- cmake/modules/FindSane.cmake | 4 ++-- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/cmake/modules/FindDjVuLibre.cmake b/cmake/modules/FindDjVuLibre.cmake index 272d8d66b..0976ba086 100644 --- a/cmake/modules/FindDjVuLibre.cmake +++ b/cmake/modules/FindDjVuLibre.cmake @@ -30,20 +30,9 @@ else (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY) ) endif(_ddjvuIncDir) - if(DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY) - set(DJVULIBRE_FOUND TRUE) - endif(DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY) - - if (DJVULIBRE_FOUND) - if (NOT DjVuLibre_FIND_QUIETLY) - message(STATUS "Found DjVuLibre: ${DJVULIBRE_LIBRARY}") - endif (NOT DjVuLibre_FIND_QUIETLY) - else (DJVULIBRE_FOUND) - if (DjVuLibre_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find DjVuLibre") - endif (DjVuLibre_FIND_REQUIRED) - endif (DJVULIBRE_FOUND) - + include(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(DjVuLibre DEFAULT_MSG DJVULIBRE_INCLUDE_DIR DJVULIBRE_LIBRARY ) + mark_as_advanced(DJVULIBRE_INCLUDE_DIR DJVULIBRE_LIBRARY) endif (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY) diff --git a/cmake/modules/FindKadmos.cmake b/cmake/modules/FindKadmos.cmake index a13aa3f04..bfbcccc6e 100644 --- a/cmake/modules/FindKadmos.cmake +++ b/cmake/modules/FindKadmos.cmake @@ -8,10 +8,10 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (KADMOS_INCLUDE_DIR) +if (KADMOS_INCLUDE_DIR AND KADMOS_LIBRARY) # Already in cache, be silent set(Kadmos_FIND_QUIETLY TRUE) -endif (KADMOS_INCLUDE_DIR) +endif (KADMOS_INCLUDE_DIR AND KADMOS_LIBRARY) FIND_PATH(KADMOS_INCLUDE_DIR kadmos.h) diff --git a/cmake/modules/FindSane.cmake b/cmake/modules/FindSane.cmake index 4a89d315d..5827f9659 100644 --- a/cmake/modules/FindSane.cmake +++ b/cmake/modules/FindSane.cmake @@ -9,10 +9,10 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (SANE_INCLUDE_DIR) +if (SANE_INCLUDE_DIR AND SANE_LIBRARY) # Already in cache, be silent set(Sane_FIND_QUIETLY TRUE) -endif (SANE_INCLUDE_DIR) +endif (SANE_INCLUDE_DIR AND SANE_LIBRARY) FIND_PATH(SANE_INCLUDE_DIR sane/sane.h)