mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Cmake build: Use LYX_COMBO() to select the qt-version to use.
Collaboration with Scott Kostyshak
This commit is contained in:
parent
cc6175bc96
commit
e264b69cfb
@ -140,7 +140,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 +540,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 +556,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 +567,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)
|
||||
|
Loading…
Reference in New Issue
Block a user