]> git.lyx.org Git - lyx.git/blobdiff - CMakeLists.txt
Support for conference posters
[lyx.git] / CMakeLists.txt
index 8f1047951aa650b204da32559db6ee333fe25c93..c626bf4251e576d57ae28cb82c84aaa1855334f9 100644 (file)
@@ -118,6 +118,7 @@ LYX_OPTION(QUIET            "Don't generate verbose makefiles" OFF ALL)
 LYX_OPTION(INSTALL_PREFIX   "Install path for LyX" OFF ALL)
 LYX_OPTION(BUNDLE           "Build bundle  (experimental) " OFF ALL)
 LYX_OPTION(ENABLE_URLTESTS  "Enable for URL tests" OFF ALL)
+LYX_OPTION(ENABLE_EXPORT_TESTS "Enable for export tests" OFF ALL)
 
 # GCC specific
 LYX_OPTION(PROFILE              "Build profile version" OFF GCC)
@@ -140,7 +141,11 @@ LYX_OPTION(DEPENDENCIES_DOWNLOAD "Download dependencies for MSVC 10" OFF MSVC)
 # APPLE specific
 LYX_OPTION(DMG                   "Build as Mac bundle, needed for .dmg  (experimental) " OFF MAC)
 LYX_OPTION(COCOA                 "Use Cocoa on Mac" OFF MAC)
-LYX_COMBO(USE_QT                 "Use Qt version as frontend (QT4 QT5)" QT4 QT5)
+if(LYX_XMINGW)
+  LYX_COMBO(USE_QT               "Use Qt version as frontend for MINGW" QT4)
+else()
+  LYX_COMBO(USE_QT               "Use Qt version as frontend" QT4 QT5)
+endif()
 
 
 if(help OR HELP)
@@ -536,10 +541,10 @@ endif()
 if(LYX_XMINGW)
     set(QT_MINGW_DIR ${LYX_QT4} CACHE PATH "Qt for Mingw" FORCE)
     list(APPEND CMAKE_FIND_ROOT_PATH ${QT_MINGW_DIR} ${GNUWIN32_DIR})
-else()
-    find_package(Qt5Core QUIET)
 endif()
-if (Qt5Core_FOUND)
+if(LYX_USE_QT MATCHES "QT5")
+  find_package(Qt5Core REQUIRED)
+  if (Qt5Core_FOUND)
        find_package(Qt5Widgets REQUIRED)
         find_package(Qt5X11Extras)
        set(QTVERSION ${Qt5Core_VERSION})
@@ -552,7 +557,8 @@ if (Qt5Core_FOUND)
        macro (qt_wrap_uifiles)
                qt5_wrap_ui(${ARGN})
        endmacro()
-else()
+  endif()
+elseif(LYX_USE_QT MATCHES "QT4")
        find_package(Qt4 "4.5.0" REQUIRED)
        macro (qt_use_modules)
        endmacro()
@@ -562,6 +568,8 @@ else()
        macro (qt_wrap_uifiles)
                qt4_wrap_ui(${ARGN})
        endmacro()
+else()
+  message(FATAL_ERROR "Unhandled value for LYX_USE_QT (${LYX_USE_QT})")
 endif()
 
 find_package(Magic)
@@ -840,7 +848,7 @@ if(LYX_ENABLE_URLTESTS)
 endif()
 
 message(STATUS)
-message(STATUS "Build options, switch LYX_* variables by -DLYX_*=ON or OFF:")
+message(STATUS "Build params, switch LYX_* options by -DLYX_*=ON or OFF, LYX_* combos by -DLYX_*=value:")
 message(STATUS)
 
 LYX_OPTION_LIST_ALL(used)
@@ -859,13 +867,15 @@ if(LYX_NLS)
        message(STATUS)
 endif()
 
-if(NOT Spelling_FOUND)
+# Apple has builtin native spell checker,
+# no need to warn for missing Aspell, Hunspell or Enchant
+if(NOT Spelling_FOUND AND NOT APPLE)
   if(LYX_REQUIRE_SPELLCHECK)
     set(_mode "FATAL_ERROR")
   else()
     set(_mode "STATUS")
   endif()
-  message(${_mode} "No spellcheck libraries found. Lyx will be unable use spellchecking")
+  message(${_mode} "No spellcheck libraries found. LyX will be unable use spellchecking")
 endif()
 
 include("${TOP_CMAKE_PATH}/LyxPackaging.cmake")