summaryrefslogtreecommitdiff
path: root/indra/cmake/FindHUNSPELL.cmake
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-06-21 17:50:41 -0400
committerOz Linden <oz@lindenlab.com>2012-06-21 17:50:41 -0400
commit4397516ca5b8fdb95acb425c55e90cf1cd5a9595 (patch)
treeaeff419b803e6560ccd6d2b0a4fd1cb4c46ddc4b /indra/cmake/FindHUNSPELL.cmake
parentf64a79d9d14fe52dc9ac599bc9e4faf8009254ce (diff)
parentb10df0b6c41c0044cb05dedba12db7923868b1ae (diff)
merge changes for DRTVWR-168
Diffstat (limited to 'indra/cmake/FindHUNSPELL.cmake')
-rw-r--r--indra/cmake/FindHUNSPELL.cmake38
1 files changed, 38 insertions, 0 deletions
diff --git a/indra/cmake/FindHUNSPELL.cmake b/indra/cmake/FindHUNSPELL.cmake
new file mode 100644
index 0000000000..6faf22959c
--- /dev/null
+++ b/indra/cmake/FindHUNSPELL.cmake
@@ -0,0 +1,38 @@
+# -*- cmake -*-
+
+# - Find HUNSPELL
+# This module defines
+# HUNSPELL_INCLUDE_DIR, where to find libhunspell.h, etc.
+# HUNSPELL_LIBRARY, the library needed to use HUNSPELL.
+# HUNSPELL_FOUND, If false, do not try to use HUNSPELL.
+
+find_path(HUNSPELL_INCLUDE_DIR hunspell.h
+ PATH_SUFFIXES hunspell
+ )
+
+set(HUNSPELL_NAMES ${HUNSPELL_NAMES} libhunspell-1.3.0 libhunspell)
+find_library(HUNSPELL_LIBRARY
+ NAMES ${HUNSPELL_NAMES}
+ )
+
+if (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
+ set(HUNSPELL_FOUND "YES")
+else (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
+ set(HUNSPELL_FOUND "NO")
+endif (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
+
+
+if (HUNSPELL_FOUND)
+ if (NOT HUNSPELL_FIND_QUIETLY)
+ message(STATUS "Found Hunspell: Library in '${HUNSPELL_LIBRARY}' and header in '${HUNSPELL_INCLUDE_DIR}' ")
+ endif (NOT HUNSPELL_FIND_QUIETLY)
+else (HUNSPELL_FOUND)
+ if (HUNSPELL_FIND_REQUIRED)
+ message(FATAL_ERROR " * * *\nCould not find HUNSPELL library! * * *")
+ endif (HUNSPELL_FIND_REQUIRED)
+endif (HUNSPELL_FOUND)
+
+mark_as_advanced(
+ HUNSPELL_LIBRARY
+ HUNSPELL_INCLUDE_DIR
+ )