mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Cmake build: Unify defines for spellchecker in config.h
This commit is contained in:
parent
6dc198ed6e
commit
f82883b097
@ -542,6 +542,8 @@ endif()
|
|||||||
include_directories(${TOP_BINARY_DIR} ${TOP_SRC_DIR}/src)
|
include_directories(${TOP_BINARY_DIR} ${TOP_SRC_DIR}/src)
|
||||||
|
|
||||||
set(Spelling_FOUND OFF)
|
set(Spelling_FOUND OFF)
|
||||||
|
set(Include_used_spellchecker) # String will be inserted into config.h
|
||||||
|
|
||||||
foreach(_spell "ASPELL" "Enchant" "Hunspell")
|
foreach(_spell "ASPELL" "Enchant" "Hunspell")
|
||||||
string(TOUPPER ${_spell} _upspell)
|
string(TOUPPER ${_spell} _upspell)
|
||||||
find_package(${_spell})
|
find_package(${_spell})
|
||||||
@ -549,6 +551,7 @@ foreach(_spell "ASPELL" "Enchant" "Hunspell")
|
|||||||
include_directories(${${_upspell}_INCLUDE_DIR})
|
include_directories(${${_upspell}_INCLUDE_DIR})
|
||||||
set(Spelling_FOUND ON)
|
set(Spelling_FOUND ON)
|
||||||
message(STATUS "Building with USE_${_upspell}")
|
message(STATUS "Building with USE_${_upspell}")
|
||||||
|
set(Include_used_spellchecker "${Include_used_spellchecker}#define USE_${_upspell} 1\n")
|
||||||
else()
|
else()
|
||||||
if(LYX_${_upspell})
|
if(LYX_${_upspell})
|
||||||
message(FATAL_ERROR "Required ${_spell} devel package not found")
|
message(FATAL_ERROR "Required ${_spell} devel package not found")
|
||||||
|
@ -59,10 +59,7 @@
|
|||||||
|
|
||||||
#cmakedefine Z_PREFIX 1
|
#cmakedefine Z_PREFIX 1
|
||||||
|
|
||||||
#cmakedefine ASPELL_FOUND 1
|
${Include_used_spellchecker}
|
||||||
#ifdef ASPELL_FOUND
|
|
||||||
#define USE_ASPELL 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#cmakedefine AIKSAURUSLIB_FOUND 1
|
#cmakedefine AIKSAURUSLIB_FOUND 1
|
||||||
#ifdef AIKSAURUSLIB_FOUND
|
#ifdef AIKSAURUSLIB_FOUND
|
||||||
@ -70,16 +67,6 @@
|
|||||||
#define AIKSAURUS_H_LOCATION "${AIKSAURUSLIB_H}"
|
#define AIKSAURUS_H_LOCATION "${AIKSAURUSLIB_H}"
|
||||||
#endif
|
#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
|
#cmakedefine LYX_NLS 1
|
||||||
#ifdef LYX_NLS
|
#ifdef LYX_NLS
|
||||||
#define ENABLE_NLS 1
|
#define ENABLE_NLS 1
|
||||||
|
Loading…
Reference in New Issue
Block a user