summaryrefslogtreecommitdiffstats
path: root/Modules/FindASPELL.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindASPELL.cmake')
-rw-r--r--Modules/FindASPELL.cmake18
1 files changed, 4 insertions, 14 deletions
diff --git a/Modules/FindASPELL.cmake b/Modules/FindASPELL.cmake
index 978407d..583e5e8 100644
--- a/Modules/FindASPELL.cmake
+++ b/Modules/FindASPELL.cmake
@@ -21,20 +21,10 @@ FIND_PATH(ASPELL_INCLUDE_DIR aspell.h )
FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15)
-IF (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
- SET(ASPELL_FOUND TRUE)
-ELSE (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
- SET(ASPELL_FOUND FALSE)
-ENDIF (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
+# handle the QUIETLY and REQUIRED arguments and set ASPELL_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL ASPELL_LIBRARIES ASPELL_INCLUDE_DIR)
-IF (ASPELL_FOUND)
- IF (NOT ASPELL_FIND_QUIETLY)
- MESSAGE(STATUS "Found ASPELL: ${ASPELL_LIBRARIES}")
- ENDIF (NOT ASPELL_FIND_QUIETLY)
-ELSE (ASPELL_FOUND)
- IF (ASPELL_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could NOT find ASPELL")
- ENDIF (ASPELL_FIND_REQUIRED)
-ENDIF (ASPELL_FOUND)
MARK_AS_ADVANCED(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES)