summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a6eac81f..dfe0e503a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1074,6 +1074,24 @@ if( WITH_GAMIN )
endif( WITH_GAMIN )
+##### check for ispell ##########################
+
+if ( NOT ISPELL_LIBDIR )
+ find_program( ISPELL_EXECUTABLE NAMES ispell DOC "path to the ispell executable" )
+ if( ISPELL_EXECUTABLE )
+ execute_process (
+ COMMAND ${ISPELL_EXECUTABLE} -vv
+ COMMAND awk "$1 == \"LIBDIR\" && $2 == \"=\" {gsub(/\"/, \"\", $3); print $3;}"
+ OUTPUT_VARIABLE ISPELL_LIBDIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if ( ISPELL_LIBDIR )
+ set ( ISPELL_LIBDIR "${ISPELL_LIBDIR}" CACHE PATH "ispell lib directory contains dictionaries" )
+ else ( ISPELL_LIBDIR )
+ unset ( ISPELL_LIBDIR )
+ endif ( ISPELL_LIBDIR )
+ endif( ISPELL_EXECUTABLE )
+endif ( NOT ISPELL_LIBDIR )
+
##### check for aspell ##########################
# we need ASPELL_DATADIR too