commit f82883b097020d8d9e3a47c50a6a78f5bcb2b98e
Author: Kornel Benko <[email protected]>
Date:   Tue May 13 14:52:11 2014 +0200

    Cmake build: Unify defines for spellchecker in config.h

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ac172d..04f3954 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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")
diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake
index 7bbe09e..3068c10 100644
--- a/development/cmake/config.h.cmake
+++ b/development/cmake/config.h.cmake
@@ -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

Reply via email to