]> git.lyx.org Git - features.git/blobdiff - 3rdparty/hunspell/CMakeLists.txt
Cmake build: Amend b399cfc7
[features.git] / 3rdparty / hunspell / CMakeLists.txt
index 1d1ac97cf30a2cd519a1c15050b7a0ab44961e2e..663f5ad3b374a7b134ef8b35f49dd1ddd42d49d1 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.6.2)
+set(HUNSPELL_VERSION 1.7.0)
 
 set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${HUNSPELL_VERSION}/src)
 
@@ -21,8 +29,6 @@ set(SRCS
     ${SRCDIR}/hunspell/csutil.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
@@ -52,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;${SRCDIR}" CACHE STRING "Hunspell include dirs" 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})