diff options
author | OBATA Akio <obache@wizdas.com> | 2020-08-19 15:53:58 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-03 22:44:46 +0100 |
commit | 431ab46758091ea3b8aa133f161a35b312e627b7 (patch) | |
tree | cf33672eda4e245e54047db2bd0ab708478bd7c4 | |
parent | 0aa014e9d244fbfb04170d36d6e1eb95e1907a33 (diff) | |
download | tdelibs-431ab46758091ea3b8aa133f161a35b312e627b7.tar.gz tdelibs-431ab46758091ea3b8aa133f161a35b312e627b7.zip |
Port ASPELL_DATADIR detection to CMake
Signed-off-by: OBATA Akio <obache@wizdas.com>
(cherry picked from commit ba75e441eab1713cac9219d93d06c478c0bc93df)
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dfe0e503a..9955a2a10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1093,14 +1093,26 @@ if ( NOT ISPELL_LIBDIR ) endif ( NOT ISPELL_LIBDIR ) ##### check for aspell ########################## -# we need ASPELL_DATADIR too if( WITH_ASPELL ) find_package( ASPELL ) if( NOT ASPELL_FOUND ) message(FATAL_ERROR "\nASPELL support are requested, but not found on your system" ) endif( NOT ASPELL_FOUND ) + if( NOT ASPELL_DATADIR ) + find_program( PSPELL_CONFIG_EXECUTABLE NAMES pspell-config DOC "path to the pspell-config executable" ) + if( PSPELL_CONFIG_EXECUTABLE ) + execute_process ( + COMMAND ${PSPELL_CONFIG_EXECUTABLE} --pkgdatadir + OUTPUT_VARIABLE ASPELL_DATADIR + OUTPUT_STRIP_TRAILING_WHITESPACE) + endif( PSPELL_CONFIG_EXECUTABLE ) + endif( NOT ASPELL_DATADIR ) endif( WITH_ASPELL ) +if( NOT ASPELL_DATADIR ) + set ( ASPELL_DATADIR "/usr/lib/aspell" ) +endif( NOT ASPELL_DATADIR ) +set ( ASPELL_DATADIR "${ASPELL_DATADIR}" CACHE PATH "aspell data directory" ) ##### check for hspell ########################## |