FindHSPELL.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # - Try to find HSPELL
  2. # Once done this will define
  3. #
  4. # HSPELL_FOUND - system has HSPELL
  5. # HSPELL_INCLUDE_DIR - the HSPELL include directory
  6. # HSPELL_LIBRARIES - The libraries needed to use HSPELL
  7. # HSPELL_DEFINITIONS - Compiler switches required for using HSPELL
  8. # Copyright (c) 2006, Alexander Neundorf, <[email protected]>
  9. #
  10. # Redistribution and use is allowed according to the terms of the BSD license.
  11. # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
  12. IF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
  13. # Already in cache, be silent
  14. SET(HSPELL_FIND_QUIETLY TRUE)
  15. ENDIF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
  16. FIND_PATH(HSPELL_INCLUDE_DIR hspell.h )
  17. FIND_LIBRARY(HSPELL_LIBRARIES NAMES hspell )
  18. IF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
  19. SET(HSPELL_FOUND TRUE)
  20. ELSE (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
  21. SET(HSPELL_FOUND FALSE)
  22. ENDIF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
  23. IF (HSPELL_FOUND)
  24. IF (NOT HSPELL_FIND_QUIETLY)
  25. MESSAGE(STATUS "Found HSPELL: ${HSPELL_LIBRARIES}")
  26. ENDIF (NOT HSPELL_FIND_QUIETLY)
  27. ELSE (HSPELL_FOUND)
  28. IF (HSPELL_FIND_REQUIRED)
  29. MESSAGE(FATAL_ERROR "Could NOT find HSPELL")
  30. ENDIF (HSPELL_FIND_REQUIRED)
  31. ENDIF (HSPELL_FOUND)
  32. MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES)