Add QtMacExtras detection for Qt5 support

This commit is contained in:
Stephan Witt 2014-08-21 18:22:43 +02:00
parent 7b31da6793
commit 327da4f275
2 changed files with 21 additions and 17 deletions

View File

@ -551,21 +551,25 @@ if(LYX_XMINGW)
list(APPEND CMAKE_FIND_ROOT_PATH ${QT_MINGW_DIR} ${GNUWIN32_DIR})
endif()
if(LYX_USE_QT MATCHES "QT5")
find_package(Qt5Core REQUIRED)
if (Qt5Core_FOUND)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5X11Extras)
set(QTVERSION ${Qt5Core_VERSION})
macro (qt_use_modules)
qt5_use_modules(${ARGN})
endmacro()
macro (qt_add_resources)
qt5_add_resources(${ARGN})
endmacro()
macro (qt_wrap_uifiles)
qt5_wrap_ui(${ARGN})
endmacro()
endif()
find_package(Qt5Core REQUIRED)
if (Qt5Core_FOUND)
find_package(Qt5Widgets REQUIRED)
if(APPLE)
find_package(Qt5MacExtras)
elseif(UNIX)
find_package(Qt5X11Extras)
endif()
set(QTVERSION ${Qt5Core_VERSION})
macro (qt_use_modules)
qt5_use_modules(${ARGN})
endmacro()
macro (qt_add_resources)
qt5_add_resources(${ARGN})
endmacro()
macro (qt_wrap_uifiles)
qt5_wrap_ui(${ARGN})
endmacro()
endif()
elseif(LYX_USE_QT MATCHES "QT4")
find_package(Qt4 "4.5.0" REQUIRED)
macro (qt_use_modules)

View File

@ -44,7 +44,7 @@ AC_DEFUN([QT_CHECK_COMPILE],
done
qt_cv_libname=
for libname in $qt_guilibs \
'-framework QtCore -framework QtConcurrent -framework QtWidgets -framework QtGui'\
'-framework QtCore -framework QtConcurrent -framework QtWidgets -framework QtMacExtras -framework QtGui'\
'-framework QtCore -framework QtGui'
do
QT_TRY_LINK($libname)
@ -254,7 +254,7 @@ AC_DEFUN([QT_DO_MANUAL_CONFIG],
QT_CORE_LDFLAGS=
if test -n "$qt_cv_includes"; then
QT_INCLUDES="-I$qt_cv_includes"
for i in Qt QtCore QtGui QtWidgets QtConcurrent; do
for i in Qt QtCore QtGui QtWidgets QtConcurrent QtMacExtras; do
QT_INCLUDES="$QT_INCLUDES -I$qt_cv_includes/$i"
done
QT_CORE_INCLUDES="-I$qt_cv_includes -I$qt_cv_includes/QtCore"