File: FindHUNSPELL.cmake

package info (click to toggle)
lyx 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 138,444 kB
  • sloc: cpp: 244,268; ansic: 106,398; xml: 72,791; python: 39,384; sh: 7,666; makefile: 6,584; pascal: 2,143; perl: 2,101; objc: 1,084; tcl: 163; sed: 16
file content (21 lines) | stat: -rw-r--r-- 741 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

if(WIN32)
  find_library(HUNSPELL_LIBRARY "libhunspell")
else()
  find_library(HUNSPELL_LIBRARY NAMES "hunspell" "hunspell-1.2" PATHS "/usr/local/lib" ${SYSTEM_LIB_DIRS} "/usr/lib64")
endif()

FIND_PATH(HUNSPELL_INCLUDE_DIR "hunspell.hxx")
if (NOT HUNSPELL_INCLUDE_DIR)
  FIND_PATH(HUNSPELL_INCLUDE_DIR "hunspell/hunspell.hxx")
  if (HUNSPELL_INCLUDE_DIR)
    set(HUNSPELL_INCLUDE_DIR "${HUNSPELL_INCLUDE_DIR}/hunspell")
  endif()
endif()

# handle the QUIETLY and REQUIRED arguments and
# set HUNSPELL_FOUND to TRUE if all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HUNSPELL DEFAULT_MSG HUNSPELL_LIBRARY HUNSPELL_INCLUDE_DIR)

mark_as_advanced(HUNSPELL_LIBRARY HUNSPELL_INCLUDE_DIR)