summaryrefslogtreecommitdiff
path: root/indra/cmake/Hunspell.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/Hunspell.cmake')
-rw-r--r--indra/cmake/Hunspell.cmake31
1 files changed, 13 insertions, 18 deletions
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index 06227b3fe2..6e92611cc9 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -1,22 +1,17 @@
# -*- cmake -*-
include(Prebuilt)
-set(HUNSPELL_FIND_QUIETLY ON)
-set(HUNSPELL_FIND_REQUIRED ON)
+include_guard()
+use_prebuilt_binary(dictionaries)
-if (USESYSTEMLIBS)
- include(FindHUNSPELL)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(libhunspell)
- if (WINDOWS)
- set(HUNSPELL_LIBRARY libhunspell)
- elseif(DARWIN)
- set(HUNSPELL_LIBRARY hunspell-1.3)
- elseif(LINUX)
- set(HUNSPELL_LIBRARY hunspell-1.3)
- else()
- message(FATAL_ERROR "Invalid platform")
- endif()
- set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell)
- use_prebuilt_binary(dictionaries)
-endif (USESYSTEMLIBS)
+add_library( ll::hunspell INTERFACE IMPORTED )
+use_conan_binary(hunspell)
+use_prebuilt_binary(libhunspell)
+if (WINDOWS)
+ target_link_libraries( ll::hunspell INTERFACE libhunspell)
+elseif(DARWIN)
+ target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+elseif(LINUX)
+ target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+endif()
+target_include_directories( ll::hunspell SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/hunspell)