diff options
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) |