2015-12-09 07:31:52 +00:00
|
|
|
|
2019-04-22 16:49:03 +00:00
|
|
|
cmake_minimum_required(VERSION 3.1)
|
|
|
|
|
2019-11-09 15:56:16 +00:00
|
|
|
set(LYX_IPO_SUPPORTED FALSE)
|
2019-04-22 16:49:03 +00:00
|
|
|
if (POLICY CMP0069)
|
2019-12-17 12:59:52 +00:00
|
|
|
cmake_policy(SET CMP0069 NEW)
|
|
|
|
if (LYX_USE_IPO MATCHES "ON")
|
|
|
|
set(LYX_IPO_SUPPORTED YES)
|
2019-07-30 13:19:56 +00:00
|
|
|
endif()
|
2019-04-22 16:49:03 +00:00
|
|
|
endif()
|
2015-12-09 07:31:52 +00:00
|
|
|
|
|
|
|
project(hunspell)
|
|
|
|
|
2019-06-12 17:29:46 +00:00
|
|
|
set(HUNSPELL_VERSION 1.7.0)
|
2015-12-09 07:31:52 +00:00
|
|
|
|
|
|
|
set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${HUNSPELL_VERSION}/src)
|
|
|
|
|
2015-12-09 16:59:47 +00:00
|
|
|
include_directories(./ ${SRCDIR}/hunspell ${SRCDIR}/parsers ${SRCDIR}/tools)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
include_directories(${SRCDIR}/win_api)
|
|
|
|
set(HUNCONFIG ${SRCDIR}/win_api/config.h)
|
|
|
|
endif()
|
2015-12-09 07:31:52 +00:00
|
|
|
|
|
|
|
# LIBS
|
|
|
|
set(SRCS
|
|
|
|
${SRCDIR}/hunspell/affentry.cxx
|
|
|
|
${SRCDIR}/hunspell/affixmgr.cxx
|
|
|
|
${SRCDIR}/hunspell/csutil.cxx
|
|
|
|
${SRCDIR}/hunspell/hashmgr.cxx
|
|
|
|
${SRCDIR}/hunspell/suggestmgr.cxx
|
|
|
|
${SRCDIR}/hunspell/phonet.cxx
|
|
|
|
${SRCDIR}/hunspell/filemgr.cxx
|
|
|
|
${SRCDIR}/hunspell/hunzip.cxx
|
|
|
|
${SRCDIR}/hunspell/hunspell.cxx
|
|
|
|
${SRCDIR}/hunspell/replist.cxx)
|
|
|
|
|
|
|
|
set(HEADERS
|
|
|
|
${SRCDIR}/hunspell/affentry.hxx
|
|
|
|
${SRCDIR}/hunspell/htypes.hxx
|
|
|
|
${SRCDIR}/hunspell/affixmgr.hxx
|
|
|
|
${SRCDIR}/hunspell/csutil.hxx
|
|
|
|
${SRCDIR}/hunspell/hunspell.hxx
|
|
|
|
${SRCDIR}/hunspell/atypes.hxx
|
|
|
|
${SRCDIR}/hunspell/hunspell.h
|
|
|
|
${SRCDIR}/hunspell/suggestmgr.hxx
|
|
|
|
${SRCDIR}/hunspell/baseaffix.hxx
|
|
|
|
${SRCDIR}/hunspell/hashmgr.hxx
|
|
|
|
${SRCDIR}/hunspell/langnum.hxx
|
|
|
|
${SRCDIR}/hunspell/phonet.hxx
|
|
|
|
${SRCDIR}/hunspell/filemgr.hxx
|
|
|
|
${SRCDIR}/hunspell/hunzip.hxx
|
|
|
|
${SRCDIR}/hunspell/w_char.hxx
|
|
|
|
${SRCDIR}/hunspell/replist.hxx
|
|
|
|
${SRCDIR}/hunspell/hunvisapi.h)
|
|
|
|
|
2015-12-09 16:59:47 +00:00
|
|
|
add_definitions(-DHUNSPELL_STATIC)
|
|
|
|
add_library(hunspell STATIC ${HEADERS} ${SRCS} ${HUNCONFIG})
|
2015-12-09 07:31:52 +00:00
|
|
|
|
|
|
|
set(HUNSPELL_LIBRARY hunspell CACHE STRING "Hunspell library" FORCE)
|
|
|
|
set(HUNSPELL_INCLUDE_DIR ${SRCDIR} CACHE STRING "Hunspell include dir" FORCE)
|
2015-12-09 16:59:47 +00:00
|
|
|
set(HUNSPELL_FOUND CACHE STRING "Hunspell found" FORCE)
|
|
|
|
|
2019-11-09 15:56:16 +00:00
|
|
|
set_target_properties(hunspell PROPERTIES
|
|
|
|
FOLDER "3rd_party"
|
|
|
|
INTERPROCEDURAL_OPTIMIZATION ${LYX_IPO_SUPPORTED})
|