summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-08-19 14:00:20 +0900
committerSlávek Banko <slavek.banko@axis.cz>2020-09-27 19:26:16 +0200
commit1b5d591d76e23d1997c40af8d33f376d5c0c8208 (patch)
tree89efd23ca0510a71cec15be50b401b1b7c35051d /CMakeLists.txt
parent132786c1940e2e205a2263568186a142dc9f3d48 (diff)
downloadtdelibs-1b5d591d76e23d1997c40af8d33f376d5c0c8208.tar.gz
tdelibs-1b5d591d76e23d1997c40af8d33f376d5c0c8208.zip
Add the ability to detect ispell lib directory
Check LIBDIR ispell compile option and use only it for ispell lib directory if found. Signed-off-by: OBATA Akio <obache@wizdas.com> (cherry picked from commit bbe1b42cbbc7293041a83b154f969792a2592510) Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
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 1b673e2ff..78c595b18 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1125,6 +1125,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