summaryrefslogtreecommitdiff
path: root/indra/cmake/Hunspell.cmake
blob: 970b06b81f86afe585e42ccf1cca085af555a18c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- cmake -*-
include(Prebuilt)

if( TARGET hunspell::hunspell )
  return()
endif()
create_target( hunspell::hunspell )

if (USESYSTEMLIBS)
  include(FindHUNSPELL)
else (USESYSTEMLIBS)
  use_prebuilt_binary(libhunspell)
  if (WINDOWS)
    set_target_libraries( hunspell::hunspell libhunspell)
  elseif(DARWIN)
    set_target_libraries( hunspell::hunspell hunspell-1.3)
  elseif(LINUX)
    set_target_libraries( hunspell::hunspell hunspell-1.3)
  else()
    message(FATAL_ERROR "Invalid platform")
  endif()
  set_target_include_dirs( hunspell::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell)
  use_prebuilt_binary(dictionaries)
endif (USESYSTEMLIBS)