diff options
author | Slávek Banko <[email protected]> | 2020-09-18 03:53:44 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-09-27 19:26:18 +0200 |
commit | 1212ebdc0ef3e020523869d60d1ebb4317de59cf (patch) | |
tree | c9381644e9b24da3b657a01080439ce1006a8e63 /CMakeLists.txt | |
parent | 49d24215b1e2557e6d0687bf4f90e6b04a0e33cb (diff) | |
download | tdelibs-1212ebdc0ef3e020523869d60d1ebb4317de59cf.tar.gz tdelibs-1212ebdc0ef3e020523869d60d1ebb4317de59cf.zip |
Add a build option for ispell.
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit c66f9211792e21ebeb956747d9643e7e0847a874)
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d17d4f01..7b1d2c0ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,6 +105,7 @@ OPTION( WITH_XCOMPOSITE "Enable xcomposite support" ON ) OPTION( WITH_MITSHM "Use MIT-SHM for pixmap loading/saving" ${WITH_ALL_OPTIONS} ) OPTION( WITH_KDE4_MENU_SUFFIX "Add [KDE4] tag to KDE4 menu items" OFF ) +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} ) @@ -1127,21 +1128,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 ########################## |