aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <montel@kde.org>2009-07-26 12:50:57 +0000
committerLaurent Montel <montel@kde.org>2009-07-26 12:50:57 +0000
commita9ed3a40905c027bbc94de8066d48b27a38b5570 (patch)
tree19e0c43613bfce4e74035d44b0e6539f582bbc39
parentadd341781f3c8c3be79c2e68201ddfcfe1de421c (diff)
downloadextra-cmake-modules-a9ed3a40905c027bbc94de8066d48b27a38b5570.tar.gz
extra-cmake-modules-a9ed3a40905c027bbc94de8066d48b27a38b5570.tar.bz2
First step to implement hunspell plugins
svn path=/trunk/KDE/kdelibs/; revision=1002571
-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)