FindHunSpell.cmake 941 B

12345678910111213141516171819202122232425262728293031323334
  1. find_path(HUNSPELL_INCLUDE_DIR hunspell.hxx
  2. /usr/local/include/hunspell
  3. /usr/local/include
  4. /usr/include/hunspell
  5. /usr/include
  6. )
  7. set(HUNSPELL_NAMES ${HUNSPELL_NAMES} hunspell hunspell-1.3.0)
  8. find_library(HUNSPELL_LIBRARY
  9. NAMES ${HUNSPELL_NAMES}
  10. PATHS /usr/lib64 /usr/local/lib64 /usr/lib /usr/local/lib
  11. )
  12. if(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
  13. set(HUNSPELL_LIBRARIES ${HUNSPELL_LIBRARY})
  14. set(HUNSPELL_FOUND "YES")
  15. else(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
  16. set(HUNSPELL_FOUND "NO")
  17. endif(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
  18. if(HUNSPELL_FOUND)
  19. if(NOT HUNSPELL_FIND_QUIETLY)
  20. message(STATUS "Found Hunspell: ${HUNSPELL_LIBRARIES}")
  21. endif(NOT HUNSPELL_FIND_QUIETLY)
  22. else(HUNSPELL_FOUND)
  23. if(HUNSPELL_FIND_REQUIRED)
  24. message(FATAL_ERROR "Could not find HunSpell library")
  25. endif(HUNSPELL_FIND_REQUIRED)
  26. endif(HUNSPELL_FOUND)
  27. mark_as_advanced(
  28. HUNSPELL_LIBRARY
  29. HUNSPELL_INCLUDE_DIR
  30. )