summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-09-18 03:53:44 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-02-03 22:47:52 +0100
commit9ffa92f841c761d107885e8cd7996f8901378399 (patch)
tree96b604993383405489048604abcf5903dcc3efe9
parent2779387ef138410ef0e0db26ebe5af31b0719a45 (diff)
downloadtdelibs-9ffa92f841c761d107885e8cd7996f8901378399.tar.gz
tdelibs-9ffa92f841c761d107885e8cd7996f8901378399.zip
Add a build option for ispell.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit c66f9211792e21ebeb956747d9643e7e0847a874)
-rw-r--r--CMakeLists.txt34
-rw-r--r--kspell2/plugins/CMakeLists.txt12
2 files changed, 22 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cfe804329..99d40c75f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,6 +92,7 @@ OPTION( WITH_XRANDR "Build the krandr library" ON )
OPTION( WITH_XCOMPOSITE "Enable xcomposite support" ON )
OPTION( WITH_MITSHM "Use MIT-SHM for pixmap loading/saving" ${WITH_ALL_OPTIONS} )
+OPTION( WITH_ISPELL "Enable ispell support" ON )
OPTION( WITH_ASPELL "Enable aspell support" ${WITH_ALL_OPTIONS} )
OPTION( WITH_HSPELL "Enable hspell support" ${WITH_ALL_OPTIONS} )
@@ -1076,21 +1077,24 @@ 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 )
+if( WITH_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 )
+endif( WITH_ISPELL )
+
##### check for aspell ##########################
diff --git a/kspell2/plugins/CMakeLists.txt b/kspell2/plugins/CMakeLists.txt
index 062d033d2..d7971e4bb 100644
--- a/kspell2/plugins/CMakeLists.txt
+++ b/kspell2/plugins/CMakeLists.txt
@@ -9,12 +9,6 @@
#
#################################################
-if( WITH_ASPELL )
- add_subdirectory( aspell )
-endif(WITH_ASPELL)
-
-if( WITH_HSPELL )
- add_subdirectory( hspell )
-endif(WITH_HSPELL)
-
-add_subdirectory( ispell )
+tde_conditional_add_subdirectory( WITH_ASPELL aspell )
+tde_conditional_add_subdirectory( WITH_HSPELL hspell )
+tde_conditional_add_subdirectory( WITH_ISPELL ispell )