2 cmake_minimum_required(VERSION 3.1)
4 set(LYX_IPO_SUPPORTED FALSE)
7 cmake_policy(SET CMP0069 NEW)
8 include(CheckIPOSupported)
9 check_ipo_supported(RESULT LYX_IPO_SUPPORTED)
15 set(HUNSPELL_VERSION 1.7.0)
17 set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${HUNSPELL_VERSION}/src)
19 include_directories(./ ${SRCDIR}/hunspell ${SRCDIR}/parsers ${SRCDIR}/tools)
22 include_directories(${SRCDIR}/win_api)
23 set(HUNCONFIG ${SRCDIR}/win_api/config.h)
28 ${SRCDIR}/hunspell/affentry.cxx
29 ${SRCDIR}/hunspell/affixmgr.cxx
30 ${SRCDIR}/hunspell/csutil.cxx
31 ${SRCDIR}/hunspell/hashmgr.cxx
32 ${SRCDIR}/hunspell/suggestmgr.cxx
33 ${SRCDIR}/hunspell/phonet.cxx
34 ${SRCDIR}/hunspell/filemgr.cxx
35 ${SRCDIR}/hunspell/hunzip.cxx
36 ${SRCDIR}/hunspell/hunspell.cxx
37 ${SRCDIR}/hunspell/replist.cxx)
40 ${SRCDIR}/hunspell/affentry.hxx
41 ${SRCDIR}/hunspell/htypes.hxx
42 ${SRCDIR}/hunspell/affixmgr.hxx
43 ${SRCDIR}/hunspell/csutil.hxx
44 ${SRCDIR}/hunspell/hunspell.hxx
45 ${SRCDIR}/hunspell/atypes.hxx
46 ${SRCDIR}/hunspell/hunspell.h
47 ${SRCDIR}/hunspell/suggestmgr.hxx
48 ${SRCDIR}/hunspell/baseaffix.hxx
49 ${SRCDIR}/hunspell/hashmgr.hxx
50 ${SRCDIR}/hunspell/langnum.hxx
51 ${SRCDIR}/hunspell/phonet.hxx
52 ${SRCDIR}/hunspell/filemgr.hxx
53 ${SRCDIR}/hunspell/hunzip.hxx
54 ${SRCDIR}/hunspell/w_char.hxx
55 ${SRCDIR}/hunspell/replist.hxx
56 ${SRCDIR}/hunspell/hunvisapi.h)
58 add_definitions(-DHUNSPELL_STATIC)
59 add_library(hunspell STATIC ${HEADERS} ${SRCS} ${HUNCONFIG})
61 set(HUNSPELL_LIBRARY hunspell CACHE STRING "Hunspell library" FORCE)
62 set(HUNSPELL_INCLUDE_DIR ${SRCDIR} CACHE STRING "Hunspell include dir" FORCE)
63 set(HUNSPELL_FOUND CACHE STRING "Hunspell found" FORCE)
65 set_target_properties(hunspell PROPERTIES
67 INTERPROCEDURAL_OPTIMIZATION ${LYX_IPO_SUPPORTED})