diff cmake/FindHunspell.cmake @ 624:01e01777ff50

CMake: initial import of CMake modules, closes #720
author David Demelier <markand@malikania.fr>
date Fri, 20 Oct 2017 14:18:37 +0200
parents
children 5bd9424a523a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake/FindHunspell.cmake	Fri Oct 20 14:18:37 2017 +0200
@@ -0,0 +1,28 @@
+# FindHunspell
+# ------------
+#
+# Find Hunspell library, this modules defines:
+#
+# Hunspell_INCLUDE_DIRS, where to find hunspell.hxx
+# Hunspell_LIBRARIES, where to find library
+# Hunspell_FOUND, if it is found
+
+find_path(
+    Hunspell_INCLUDE_DIR
+    NAMES hunspell.hxx
+    PATH_SUFFIXES hunspell
+)
+find_library(Hunspell_LIBRARY NAMES libhunspell hunspell)
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(
+    Hunspell
+    FOUND_VAR Hunspell_FOUND
+    REQUIRED_VARS Hunspell_LIBRARY Hunspell_INCLUDE_DIR
+)
+
+set(Hunspell_LIBRARIES ${Hunspell_LIBRARY})
+set(Hunspell_INCLUDE_DIRS ${Hunspell_INCLUDE_DIR})
+
+mark_as_advanced(Hunspell_INCLUDE_DIR Hunspell_LIBRARY)