]> git.lyx.org Git - lyx.git/blob - development/cmake/modules/FindHunspell.cmake
cmake: more cleanup
[lyx.git] / development / cmake / modules / FindHunspell.cmake
1
2 if(WIN32)
3   find_library(HUNSPELL_LIBRARY "libhunspell")
4 else()
5   #find_library(HUNSPELL_LIBRARY NAME "hunspell" PATH "/usr/local/lib" "/usr/lib" NO_DEFAULT_PATH)
6   find_library(HUNSPELL_LIBRARY NAMES "hunspell" "hunspell-1.2" PATHS "/usr/local/lib" "/usr/lib" "/usr/lib64")
7 endif()
8
9 FIND_PATH(HUNSPELL_INCLUDE_DIR "hunspell/hunspell.hxx")
10
11
12 # handle the QUIETLY and REQUIRED arguments and 
13 # set HUNSPELL_FOUND to TRUE if all listed variables are TRUE
14 include(FindPackageHandleStandardArgs)
15 find_package_handle_standard_args(HUNSPELL DEFAULT_MSG HUNSPELL_LIBRARY HUNSPELL_INCLUDE_DIR)
16
17 if(HUNSPELL_FIND_REQUIRED AND NOT HUNSPELL_FOUND)
18         message(FATAL_ERROR "Could not find Hunspell library")
19 endif()
20
21 mark_as_advanced(HUNSPELL_LIBRARY HUNSPELL_INCLUDE_DIR)