diff options
Diffstat (limited to 'Modules/FindHSPELL.cmake')
-rw-r--r-- | Modules/FindHSPELL.cmake | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/Modules/FindHSPELL.cmake b/Modules/FindHSPELL.cmake index a2b93a7..b016258 100644 --- a/Modules/FindHSPELL.cmake +++ b/Modules/FindHSPELL.cmake @@ -22,21 +22,11 @@ FIND_PATH(HSPELL_INCLUDE_DIR hspell.h ) FIND_LIBRARY(HSPELL_LIBRARIES NAMES hspell ) -IF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES) - SET(HSPELL_FOUND TRUE) -ELSE (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES) - SET(HSPELL_FOUND FALSE) -ENDIF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES) +# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL HSPELL_LIBRARIES HSPELL_INCLUDE_DIR) -IF (HSPELL_FOUND) - IF (NOT HSPELL_FIND_QUIETLY) - MESSAGE(STATUS "Found HSPELL: ${HSPELL_LIBRARIES}") - ENDIF (NOT HSPELL_FIND_QUIETLY) -ELSE (HSPELL_FOUND) - IF (HSPELL_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could NOT find HSPELL") - ENDIF (HSPELL_FIND_REQUIRED) -ENDIF (HSPELL_FOUND) MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES) |