summaryrefslogtreecommitdiffstats
path: root/CMakeScripts/Modules/FindGtkSpell.cmake
diff options
context:
space:
mode:
authorAndrew Higginson <at.higginson@gmail.com>2011-12-27 21:04:47 +0000
committerAndrew <at.higginson@gmail.com>2011-12-27 21:04:47 +0000
commit80960b623a99aae1402ab651b2974ef544ed3b03 (patch)
treeba49d42c2789e9e11f805e2d5263e10f9fedeef8 /CMakeScripts/Modules/FindGtkSpell.cmake
parenttry to fix bug (diff)
parentGDL: Cherry-pick upstream patch 73852 (2011-03-23) - Add missing return value. (diff)
downloadinkscape-80960b623a99aae1402ab651b2974ef544ed3b03.tar.gz
inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.zip
merged with trunk so I can build again...
(bzr r10092.1.36)
Diffstat (limited to 'CMakeScripts/Modules/FindGtkSpell.cmake')
-rw-r--r--CMakeScripts/Modules/FindGtkSpell.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/CMakeScripts/Modules/FindGtkSpell.cmake b/CMakeScripts/Modules/FindGtkSpell.cmake
new file mode 100644
index 000000000..131ad8dc8
--- /dev/null
+++ b/CMakeScripts/Modules/FindGtkSpell.cmake
@@ -0,0 +1,28 @@
+# - Try to find GtkSpell
+# Once done this will define
+#
+# GTKSPELL_FOUND - system has GtkSpell
+# GTKSPELL_INCLUDE_DIRS - the GtkSpell include directory
+# GTKSPELL_LIBRARIES - Link these to use GtkSpell
+# GTKSPELL_DEFINITIONS - Compiler switches required for using GtkSpell
+#
+# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+include(${CMAKE_CURRENT_LIST_DIR}/../HelperMacros.cmake)
+
+if (GTKSPELL_LIBRARIES AND GTKSPELL_INCLUDE_DIRS)
+ # in cache already
+ set(GTKSPELL_FOUND TRUE)
+else (GTKSPELL_LIBRARIES AND GTKSPELL_INCLUDE_DIRS)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+ INKSCAPE_PKG_CONFIG_FIND(GTKSPELL gtkspell-2.0 0 gtkspell/gtkspell.h gtkspell-2.0 gtkspell)
+ endif (PKG_CONFIG_FOUND)
+endif (GTKSPELL_LIBRARIES AND GTKSPELL_INCLUDE_DIRS)