add_definitions(-DHAVE_GETTEXT)
endif()
+if(WIN32)
+ find_library(HUNSPELL_LIBRARY "libhunspell")
+else()
+ find_library(HUNSPELL_LIBRARY "hunspell")
+endif()
+if (HUNSPELL_LIBRARY)
+ find_file(HUNSPELL_FOUND "hunspell/hunspell.hxx")
+endif()
+
+if (HUNSPELL_FOUND)
+ add_definitions(-DUSE_HUNSPELL=1)
+ message(STATUS "----- Building with USE_HUNSPELL")
+else()
+ message(STATUS "----- Hunspell not found, building without hunspell support")
+endif()
+
message(STATUS "")
if(nls OR all)
set(nls TRUE CACHE TYPE STRING)
message(STATUS "")
-add_definitions(-DBOOST_USER_CONFIG="<config.h>")
-
if(MSVC AND NOT disable-pch AND NOT MERGE_FILES)
message(STATUS "-----")
message(STATUS "----- using precompiled headers, disable with -Ddisable-pch=1")
include(ConfigureChecks.cmake)
configure_file(configCompiler.h.cmake ${CMAKE_BINARY_DIR}/configCompiler.h)
endif()
-find_package(MyThesLIB)
-if(MYTHESLIB_FOUND)
- # Variables in config.h will be set correctly with configure_file()
- set(HAVE_LIBMYTHES 1)
- set(MYTHES_H_LOCATION 1)
-else()
- find_package(AiksaurusLIB)
- if(AIKSAURUSLIB_FOUND)
- # Variables in config.h will be set correctly with configure_file()
- set(HAVE_LIBAIKSAURUS 1)
- set(AIKSAURUS_H_LOCATION 1)
- endif()
-endif()
+
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
find_package(ICONV REQUIRED)
add_definitions(-DHAVE_ICONV=1)
+
include_directories(
- ${CMAKE_BINARY_DIR}
- ${TOP_SRC_DIR}/src
- ${TOP_SRC_DIR}/boost)
+ ${CMAKE_BINARY_DIR}
+ ${TOP_SRC_DIR}/src)
+
+option(UseExternalBoost "Use external boost" OFF)
+if(UseExternalBoost)
+ message(STATUS "Searching for boost")
+ find_package(Boost COMPONENTS signals regex)
+ if(Boost_FOUND)
+ message(STATUS "Boost found")
+ message(STATUS "Boost-libs = ${Boost_LIBRARIES}")
+ set(Lyx_Boost_Libraries ${Boost_LIBRARIES})
+ else()
+ message(FATAL_ERROR "Boost not found" ${Boost_ERROR_REASON})
+ endif()
+else()
+ message(STATUS "----- Using internal boost. To build with installed version use -DUseExternalBoost:BOOL=ON")
+ set(Lyx_Boost_Libraries boost_signals boost_regex)
+ add_definitions(-DBOOST_USER_CONFIG="<config.h>")
+ include_directories(${TOP_SRC_DIR}/boost)
+ add_subdirectory(boost)
+endif()
+
-add_subdirectory(boost)
if(NOT use_external_libintl)
- add_subdirectory(intl)
+ add_subdirectory(intl)
endif()
add_subdirectory(src)