Cmake build: Unify defines for spellchecker in config.h

This commit is contained in:
Kornel Benko 2014-05-13 14:52:11 +02:00
parent 6dc198ed6e
commit f82883b097
2 changed files with 4 additions and 14 deletions

View File

@ -542,6 +542,8 @@ endif()
include_directories(${TOP_BINARY_DIR} ${TOP_SRC_DIR}/src)
set(Spelling_FOUND OFF)
set(Include_used_spellchecker) # String will be inserted into config.h
foreach(_spell "ASPELL" "Enchant" "Hunspell")
string(TOUPPER ${_spell} _upspell)
find_package(${_spell})
@ -549,6 +551,7 @@ foreach(_spell "ASPELL" "Enchant" "Hunspell")
include_directories(${${_upspell}_INCLUDE_DIR})
set(Spelling_FOUND ON)
message(STATUS "Building with USE_${_upspell}")
set(Include_used_spellchecker "${Include_used_spellchecker}#define USE_${_upspell} 1\n")
else()
if(LYX_${_upspell})
message(FATAL_ERROR "Required ${_spell} devel package not found")

View File

@ -59,10 +59,7 @@
#cmakedefine Z_PREFIX 1
#cmakedefine ASPELL_FOUND 1
#ifdef ASPELL_FOUND
#define USE_ASPELL 1
#endif
${Include_used_spellchecker}
#cmakedefine AIKSAURUSLIB_FOUND 1
#ifdef AIKSAURUSLIB_FOUND
@ -70,16 +67,6 @@
#define AIKSAURUS_H_LOCATION "${AIKSAURUSLIB_H}"
#endif
#cmakedefine ENCHANT_FOUND 1
#ifdef ENCHANT_FOUND
#define USE_ENCHANT 1
#endif
#cmakedefine HUNSPELL_FOUND 1
#ifdef HUNSPELL_FOUND
#define USE_HUNSPELL 1
#endif
#cmakedefine LYX_NLS 1
#ifdef LYX_NLS
#define ENABLE_NLS 1