]> git.lyx.org Git - features.git/blobdiff - 3rdparty/hunspell/CMakeLists.txt
Cmake build: Use correct include if using internal hunspell
[features.git] / 3rdparty / hunspell / CMakeLists.txt
index 0000eac5fa24001468638db51592b1ebc3301fc0..c69093848f65285dbed4c6538b930985eb5d66e0 100644 (file)
@@ -1,9 +1,17 @@
 
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.1)
+
+set(LYX_IPO_SUPPORTED FALSE)
+if (POLICY CMP0069)
+  cmake_policy(SET CMP0069 NEW)
+  if (LYX_USE_IPO MATCHES "ON")
+    set(LYX_IPO_SUPPORTED YES)
+  endif()
+endif()
 
 project(hunspell)
 
-set(HUNSPELL_VERSION 1.3.3)
+set(HUNSPELL_VERSION 1.7.0)
 
 set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${HUNSPELL_VERSION}/src)
 
@@ -19,11 +27,8 @@ set(SRCS
     ${SRCDIR}/hunspell/affentry.cxx
     ${SRCDIR}/hunspell/affixmgr.cxx
     ${SRCDIR}/hunspell/csutil.cxx
-    ${SRCDIR}/hunspell/dictmgr.cxx
     ${SRCDIR}/hunspell/hashmgr.cxx
     ${SRCDIR}/hunspell/suggestmgr.cxx
-    ${SRCDIR}/hunspell/license.myspell
-    ${SRCDIR}/hunspell/license.hunspell
     ${SRCDIR}/hunspell/phonet.cxx
     ${SRCDIR}/hunspell/filemgr.cxx
     ${SRCDIR}/hunspell/hunzip.cxx
@@ -37,7 +42,6 @@ set(HEADERS
     ${SRCDIR}/hunspell/csutil.hxx
     ${SRCDIR}/hunspell/hunspell.hxx
     ${SRCDIR}/hunspell/atypes.hxx
-    ${SRCDIR}/hunspell/dictmgr.hxx
     ${SRCDIR}/hunspell/hunspell.h
     ${SRCDIR}/hunspell/suggestmgr.hxx
     ${SRCDIR}/hunspell/baseaffix.hxx
@@ -54,7 +58,9 @@ add_definitions(-DHUNSPELL_STATIC)
 add_library(hunspell STATIC ${HEADERS} ${SRCS} ${HUNCONFIG})
 
 set(HUNSPELL_LIBRARY hunspell CACHE STRING "Hunspell library" FORCE)
-set(HUNSPELL_INCLUDE_DIR ${SRCDIR} CACHE STRING "Hunspell include dir" FORCE)
+set(HUNSPELL_INCLUDE_DIR "${SRCDIR}/hunspell" CACHE STRING "Hunspell include dir" FORCE)
 set(HUNSPELL_FOUND CACHE STRING "Hunspell found" FORCE)
 
-set_target_properties(hunspell PROPERTIES FOLDER "3rd_party")
+set_target_properties(hunspell PROPERTIES
+       FOLDER "3rd_party"
+       INTERPROCEDURAL_OPTIMIZATION ${LYX_IPO_SUPPORTED})