summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorcraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-04-10 20:15:53 +0000
committercraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-04-10 20:15:53 +0000
commitf126c81ff6cb6d2bf5a17e9e706d3dbec262dd53 (patch)
tree0749c42d2b5795805417bdf387c548615f6eaafc /cmake
parent50c2b87ba62af3be9475b3ad235c133818dbfb3d (diff)
downloadscribus-f126c81ff6cb6d2bf5a17e9e706d3dbec262dd53.tar.gz
scribus-f126c81ff6cb6d2bf5a17e9e706d3dbec262dd53.tar.xz
scribus-f126c81ff6cb6d2bf5a17e9e706d3dbec262dd53.zip
Add Hunspell CMake Finder script
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17428 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindHUNSPELL.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmake/modules/FindHUNSPELL.cmake b/cmake/modules/FindHUNSPELL.cmake
new file mode 100644
index 0000000..ecd4776
--- /dev/null
+++ b/cmake/modules/FindHUNSPELL.cmake
@@ -0,0 +1,23 @@
+# - 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
+
+#Based on examples at http://www.vtk.org/Wiki/CMake:How_To_Find_Libraries
+
+FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell/hunspell.hxx )
+FIND_LIBRARY(HUNSPELL_LIBRARIES NAMES hunspell-1.3 hunspell-1.2 PATHS /opt/local/lib /usr/local/lib /usr/lib )
+
+INCLUDE(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set HUNSPELL_FOUND to TRUE
+# if all listed variables are TRUE
+
+#FIND_PACKAGE(HUNSPELL QUIET NO_MODULE HINTS /opt/local/bin/hunspell)
+#FIND_PACKAGE_HANDLE_STANDARD_ARGS(HUNSPELL CONFIG_MODE)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(HUNSPELL DEFAULT_MSG HUNSPELL_LIBRARIES HUNSPELL_INCLUDE_DIR )
+
+MARK_AS_ADVANCED(HUNSPELL_INCLUDE_DIR HUNSPELL_LIBRARIES)