integrate 3rdparty libs

This commit is contained in:
Peter Kümmel 2015-12-09 13:54:08 +01:00
parent 2ce5ca7fcc
commit b46ea7fac0
2 changed files with 25 additions and 6 deletions

View File

@ -620,7 +620,7 @@ foreach(_spell "ASPELL" "Enchant" "Hunspell")
message(STATUS "Building with USE_${_upspell}")
set(Include_used_spellchecker "${Include_used_spellchecker}#define USE_${_upspell} 1\n")
else()
if(LYX_${_upspell})
if(LYX_${_upspell} AND NOT LYX_HUNSPELL)
message(FATAL_ERROR "Required ${_spell} devel package not found")
else()
message(STATUS "${_upspell} not found, building without ${_spell} support")
@ -628,6 +628,15 @@ foreach(_spell "ASPELL" "Enchant" "Hunspell")
endif()
endforeach()
if(LYX_HUNSPELL AND NOT HUNSPELL_FOUND)
add_subdirectory(src/3rdparty/hunspell)
set(Spelling_FOUND ON)
endif()
message(STATUS " * Hunspell:")
message(STATUS " - include: ${HUNSPELL_INCLUDE_DIR}")
message(STATUS " - library: ${HUNSPELL_LIBRARY}")
find_package(PythonInterp 2.7 QUIET)
if(PYTHONINTERP_FOUND)
if(PYTHON_VERSION_STRING VERSION_GREATER 2.8)
@ -660,9 +669,19 @@ if(LYX_NLS)
endif()
endif()
if(UNIX)
find_package(ICONV REQUIRED)
find_package(ZLIB REQUIRED)
endif()
if(NOT ICONV_FOUND)
add_subdirectory(src/3rdparty/libiconv)
endif()
if(NOT ZLIB_FOUND)
add_subdirectory(src/3rdparty/zlib)
endif()
find_package(ICONV REQUIRED)
find_package(ZLIB REQUIRED)
if(LYX_EXTERNAL_BOOST)
message(STATUS "Searching for boost")
@ -929,10 +948,10 @@ if(LYX_NLS)
message(STATUS "Building Native Language Support (LYX_NLS is set), used libraries:")
message(STATUS)
message(STATUS " * iconv")
message(STATUS " - header : ${ICONV_HEADER}")
message(STATUS " - include: ${ICONV_INCLUDE_DIR}")
message(STATUS " - library: ${ICONV_LIBRARY}")
message(STATUS " * zlib")
message(STATUS " - header : ${ZLIB_HEADER}")
message(STATUS " - include: ${ZLIB_INCLUDE_DIR}")
message(STATUS " - library: ${ZLIB_LIBRARY}")
message(STATUS)
endif()

View File

@ -70,7 +70,7 @@ if(WIN32)
endif()
include_directories(${CMAKE_CURRENT_BINARY_DIR}
${ZLIB_INCLUDE_DIR} ${QT_INCLUDES})
${ZLIB_INCLUDE_DIR} ${ICONV_INCLUDE_DIR} ${QT_INCLUDES})
lyx_add_msvc_pch(lyx)