summaryrefslogtreecommitdiff
path: root/indra/cmake/Hunspell.cmake
diff options
context:
space:
mode:
authorNicky <nicky.dasmijn@gmail.com>2022-04-06 16:32:52 +0200
committerNicky <nicky.dasmijn@gmail.com>2022-04-06 16:32:52 +0200
commit786b291d9c6b784c7ce6ceef0e38a4ec76ea14db (patch)
treeed7386562337f06b212e0e95753c891ec7efbb3a /indra/cmake/Hunspell.cmake
parent7522cea2528f9cfdf5283a7920dd3434417b20f4 (diff)
Move CMake files to modernized cmake syntax, step 1.
Change projects to cmake targetsto get rid of havig to hardcore include directories and link libraries in consumer projects.
Diffstat (limited to 'indra/cmake/Hunspell.cmake')
-rw-r--r--indra/cmake/Hunspell.cmake14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index 06227b3fe2..970b06b81f 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -1,22 +1,24 @@
# -*- cmake -*-
include(Prebuilt)
-set(HUNSPELL_FIND_QUIETLY ON)
-set(HUNSPELL_FIND_REQUIRED ON)
+if( TARGET hunspell::hunspell )
+ return()
+endif()
+create_target( hunspell::hunspell )
if (USESYSTEMLIBS)
include(FindHUNSPELL)
else (USESYSTEMLIBS)
use_prebuilt_binary(libhunspell)
if (WINDOWS)
- set(HUNSPELL_LIBRARY libhunspell)
+ set_target_libraries( hunspell::hunspell libhunspell)
elseif(DARWIN)
- set(HUNSPELL_LIBRARY hunspell-1.3)
+ set_target_libraries( hunspell::hunspell hunspell-1.3)
elseif(LINUX)
- set(HUNSPELL_LIBRARY hunspell-1.3)
+ set_target_libraries( hunspell::hunspell hunspell-1.3)
else()
message(FATAL_ERROR "Invalid platform")
endif()
- set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell)
+ set_target_include_dirs( hunspell::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell)
use_prebuilt_binary(dictionaries)
endif (USESYSTEMLIBS)