Cmake build: Set cache variables correctly

In case of LYX_EXTERNAL_MYTHES==AUTO, the setting never made it into cache.
This commit is contained in:
Kornel Benko 2017-03-25 12:43:53 +01:00
parent 2a0e4c199c
commit 5d4db9dcf5

View File

@ -625,6 +625,16 @@ if(LYX_USE_QT MATCHES "QT5")
find_package(Qt5X11Extras QUIET)
find_package(Qt5WinExtras QUIET)
set(QTVERSION ${Qt5Core_VERSION})
if (QTVERSION VERSION_LESS "5.4")
message(STATUS "QTVERSION = \"${QTVERSION}\"")
message(STATUS "This version is not recommended, try either option -DLYX_USE_QT=QT4 or")
message(STATUS "install QT-Version >= \"5.4\"")
# see thread in lyx-devel list
# From: Jean-Pierre Chrétien <jeanpierre.chretien@free.fr>
# Date 11.03.2017
# Subject: cmake compilation error
#message(FATAL_ERROR "Wrong Qt-Version")
endif()
macro (qt_use_modules)
qt5_use_modules(${ARGN})
endmacro()
@ -675,9 +685,9 @@ if (LYX_EXTERNAL_MYTHES MATCHES "AUTO")
# try system library first
find_package(MyThesLIB)
if (MYTHESLIB_FOUND)
set(LYX_EXTERNAL_MYTHES CACHE STRING "ON" FORCE)
set(LYX_EXTERNAL_MYTHES ON CACHE STRING "OFF:= Build 3rdparty mytheslib" FORCE)
else()
set(LYX_EXTERNAL_MYTHES CACHE STRING "OFF" FORCE)
set(LYX_EXTERNAL_MYTHES OFF CACHE STRING "OFF:= Build 3rdparty mytheslib" FORCE)
endif()
endif()
if (LYX_EXTERNAL_MYTHES MATCHES "ON")
@ -814,7 +824,7 @@ if(WIN32)
endif()
endif()
# Compute qt4-version from ${QTVERSION}
# Compute qt-version from ${QTVERSION}
message(STATUS "")
foreach(_v PACKAGE PACKAGE_VERSION