Hunspell.cmake 658 B

1234567891011121314151617181920212223242526272829
  1. # -*- cmake -*-
  2. if (HUNSPELL_CMAKE_INCLUDED)
  3. return()
  4. endif (HUNSPELL_CMAKE_INCLUDED)
  5. set (HUNSPELL_CMAKE_INCLUDED TRUE)
  6. include(Prebuilt)
  7. if (USESYSTEMLIBS)
  8. set(HUNSPELL_FIND_QUIETLY OFF)
  9. set(HUNSPELL_FIND_REQUIRED OFF)
  10. include(FindHunSpell)
  11. endif (USESYSTEMLIBS)
  12. if (NOT HUNSPELL_FOUND)
  13. use_prebuilt_binary(hunspell)
  14. set(HUNSPELL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/hunspell)
  15. if (LINUX)
  16. set(HUNSPELL_LIBRARY hunspell-1.3)
  17. elseif (DARWIN)
  18. set(HUNSPELL_LIBRARY libhunspell-1.3.a)
  19. else (LINUX)
  20. set(HUNSPELL_LIBRARY libhunspell)
  21. endif ()
  22. endif (NOT HUNSPELL_FOUND)
  23. include_directories(SYSTEM ${HUNSPELL_INCLUDE_DIR})