Use guard for QT5/XCB also for cmake build.

See commit d4428ceb81
from Enrico Forestieri
This commit is contained in:
Kornel Benko 2016-04-09 11:53:55 +02:00
parent 38bfc6a542
commit 4aa88e982a

View File

@ -588,7 +588,9 @@ if(LYX_XMINGW)
list(APPEND CMAKE_FIND_ROOT_PATH ${GNUWIN32_DIR})
endif()
set(QPA_XCB)
if(LYX_USE_QT MATCHES "QT5")
# set QPA_XCB if QT uses X11
find_package(Qt5Core REQUIRED)
if (Qt5Core_FOUND)
find_package(Qt5Widgets REQUIRED)
@ -596,6 +598,9 @@ if(LYX_USE_QT MATCHES "QT5")
find_package(Qt5MacExtras REQUIRED)
endif()
find_package(Qt5X11Extras QUIET)
if(Qt5X11Extras_FOUND)
set(QPA_XCB 1)
endif()
find_package(Qt5WinExtras QUIET)
set(QTVERSION ${Qt5Core_VERSION})
macro (qt_use_modules)