diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-07-18 17:56:45 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-07-18 17:56:45 (GMT) |
commit | b5f656e0de6e39f0fd935203e0ef2b4231af733d (patch) | |
tree | 8b58020cca8fef8af4df6ae631fddf49e3230049 /Modules/FindJasper.cmake | |
parent | e118a62709fdc84e6c5b5b8d0bb055895d206ec9 (diff) | |
download | CMake-b5f656e0de6e39f0fd935203e0ef2b4231af733d.zip CMake-b5f656e0de6e39f0fd935203e0ef2b4231af733d.tar.gz CMake-b5f656e0de6e39f0fd935203e0ef2b4231af733d.tar.bz2 |
ENH: use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS in some of the FindXXX
modules, remove some of the extra search paths which are also searched by
default
Alex
Diffstat (limited to 'Modules/FindJasper.cmake')
-rw-r--r-- | Modules/FindJasper.cmake | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake index ac284c3..0243ce7 100644 --- a/Modules/FindJasper.cmake +++ b/Modules/FindJasper.cmake @@ -23,21 +23,16 @@ FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h) FIND_LIBRARY(JASPER_LIBRARY NAMES jasper libjasper) IF (JASPER_INCLUDE_DIR AND JASPER_LIBRARY AND JPEG_LIBRARIES) - SET(JASPER_FOUND TRUE) SET(JASPER_LIBRARIES ${JASPER_LIBRARY} ${JPEG_LIBRARIES} ) -ELSE (JASPER_INCLUDE_DIR AND JASPER_LIBRARY AND JPEG_LIBRARIES) - SET(JASPER_FOUND FALSE) ENDIF (JASPER_INCLUDE_DIR AND JASPER_LIBRARY AND JPEG_LIBRARIES) +# handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper JASPER_LIBRARY JASPER_INCLUDE_DIR JPEG_LIBRARIES) IF (JASPER_FOUND) - IF (NOT Jasper_FIND_QUIETLY) - MESSAGE(STATUS "Found jasper: ${JASPER_LIBRARIES}") - ENDIF (NOT Jasper_FIND_QUIETLY) -ELSE (JASPER_FOUND) - IF (Jasper_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could NOT find jasper library") - ENDIF (Jasper_FIND_REQUIRED) + SET(JASPER_LIBRARIES ${JASPER_LIBRARY} ${JPEG_LIBRARIES} ) ENDIF (JASPER_FOUND) MARK_AS_ADVANCED(JASPER_INCLUDE_DIR JASPER_LIBRARIES JASPER_LIBRARY) |