mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Amend ac248e39
, get rid of Qt4 code also in cmake build
This commit is contained in:
parent
546efc3ff1
commit
580dea638d
@ -219,7 +219,7 @@ else()
|
||||
endif()
|
||||
LYX_COMBO(DEBUG_SANITIZE "Use sanitize check" NONE ADDRESS UNSPECIFIED)
|
||||
#LYX_COMBO(USE_FILEDIALOG "Use native or QT file dialog" QT NATIVE)
|
||||
LYX_COMBO(USE_QT "Use Qt version as frontend" AUTO QT4 QT5 QT6)
|
||||
LYX_COMBO(USE_QT "Use Qt version as frontend" AUTO QT5 QT6)
|
||||
LYX_COMBO(USE_IPO "Interprocedural optimization" OFF AUTO ON)
|
||||
#LYX_OPTION(3RDPARTY_BUILD "Build 3rdparty libs" OFF ALL)
|
||||
LYX_OPTION(DISABLE_CALLSTACK_PRINTING "do not print a callstack when crashing" OFF ALL)
|
||||
@ -764,10 +764,7 @@ if(LYX_USE_QT MATCHES "AUTO")
|
||||
set(LYX_USE_QT "QT5" CACHE STRING "Valid qt version" FORCE)
|
||||
message(STATUS "Qt5Core_VERSION = ${Qt5Core_VERSION}")
|
||||
if(Qt5Core_VERSION VERSION_LESS ${min_qt5_version})
|
||||
find_package(Qt4 "4.5.0" QUIET)
|
||||
if(QT4_FOUND)
|
||||
set(LYX_USE_QT "QT4" CACHE STRING "Valid qt version" FORCE)
|
||||
endif()
|
||||
message(FATAL_ERROR "No appropriate QT-version found")
|
||||
endif()
|
||||
else()
|
||||
set(LYX_USE_QT "QT4" CACHE STRING "Valid qt version" FORCE)
|
||||
@ -811,8 +808,8 @@ if(LYX_USE_QT MATCHES "QT6|QT5")
|
||||
set(QTVERSION ${${QtVal}Core_VERSION})
|
||||
if (QTVERSION VERSION_LESS ${min_qt5_version})
|
||||
message(STATUS "QTVERSION = \"${QTVERSION}\"")
|
||||
message(STATUS "This version is not recommended, try either option -DLYX_USE_QT=QT4 or")
|
||||
message(STATUS "install QT-Version >= \"${min_qt5_version}\"")
|
||||
message(STATUS "This version is not recommended,")
|
||||
message(STATUS "please install QT-Version >= \"${min_qt5_version}\"")
|
||||
# see thread in lyx-devel list
|
||||
# From: Jean-Pierre Chrétien <jeanpierre.chretien@free.fr>
|
||||
# Date 11.03.2017
|
||||
@ -837,24 +834,6 @@ if(LYX_USE_QT MATCHES "QT6|QT5")
|
||||
set(QtCore5CompatModule Core5Compat)
|
||||
endif()
|
||||
endif()
|
||||
elseif(LYX_USE_QT MATCHES "QT4")
|
||||
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})
|
||||
endif()
|
||||
find_package(Qt4 "4.5.0" REQUIRED)
|
||||
macro (qt_use_modules)
|
||||
endmacro()
|
||||
macro (qt_add_resources)
|
||||
qt4_add_resources(${ARGN})
|
||||
endmacro()
|
||||
macro (qt_wrap_uifiles)
|
||||
qt4_wrap_ui(${ARGN})
|
||||
endmacro()
|
||||
set(LYX_QTMAIN_LIBRARY ${QT_QTSVG_LIBRARY})
|
||||
if(WIN32)
|
||||
list(APPEND LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARIES})
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Unhandled value for LYX_USE_QT (${LYX_USE_QT})")
|
||||
endif()
|
||||
@ -1194,7 +1173,7 @@ unset(opts)
|
||||
unset(tmp_vi)
|
||||
|
||||
if(QTVERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*")
|
||||
MATH(EXPR QT4_VERSION "(${CMAKE_MATCH_1}<<16)|(${CMAKE_MATCH_2}<<8)|${CMAKE_MATCH_3}")
|
||||
MATH(EXPR QTx_VERSION "(${CMAKE_MATCH_1}<<16)|(${CMAKE_MATCH_2}<<8)|${CMAKE_MATCH_3}")
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -111,7 +111,7 @@ macro(LYX_AUTOMOC)
|
||||
#set(_moc ${_abs_PATH}/${_current_MOC})
|
||||
add_custom_command(OUTPUT ${_moc}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS "-DQT_VERSION=${QT4_VERSION}" ${_def} ${_moc_INCS} ${_header} -o ${_moc}
|
||||
ARGS "-DQT_VERSION=${QTx_VERSION}" ${_def} ${_moc_INCS} ${_header} -o ${_moc}
|
||||
MAIN_DEPENDENCY ${_header})
|
||||
macro_add_file_dependencies(${_abs_FILE} ${_moc})
|
||||
SET_SOURCE_FILES_PROPERTIES(${_moc} GENERATED)
|
||||
|
Loading…
Reference in New Issue
Block a user