aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/FindHUNSPELL.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/FindHUNSPELL.cmake b/modules/FindHUNSPELL.cmake
new file mode 100644
index 00000000..30f37730
--- /dev/null
+++ b/modules/FindHUNSPELL.cmake
@@ -0,0 +1,25 @@
+# - Try to find HUNSPELL
+# Once done this will define
+#
+# HUNSPELL_FOUND - system has HUNSPELL
+# HUNSPELL_INCLUDE_DIR - the HUNSPELL include directory
+# HUNSPELL_LIBRARIES - The libraries needed to use HUNSPELL
+# HUNSPELL_DEFINITIONS - Compiler switches required for using HUNSPELL
+
+
+IF (HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES)
+ # Already in cache, be silent
+ SET(HUNSPELL_FIND_QUIETLY TRUE)
+ENDIF (HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES)
+
+FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell/hunspell.hxx )
+
+FIND_LIBRARY(HUNSPELL_LIBRARIES NAMES hunspell-1.2)
+
+# 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_LIBRARIES HUNSPELL_INCLUDE_DIR)
+
+
+MARK_AS_ADVANCED(HUNSPELL_INCLUDE_DIR HUNSPELL_LIBRARIES)