Don't search for QtMotif on all platforms - only on X11.
This commit is contained in:
parent
184a3418e6
commit
f756b73ac5
|
@ -571,6 +571,47 @@ IF (QT4_QMAKE_FOUND)
|
|||
QT_PLUGINS_DIR QT_TRANSLATIONS_DIR)
|
||||
|
||||
|
||||
#############################################
|
||||
#
|
||||
# Find out what window system we're using
|
||||
#
|
||||
#############################################
|
||||
# Save required variable
|
||||
SET(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
|
||||
SET(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
|
||||
# Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
|
||||
SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_HEADERS_DIR}")
|
||||
# On Mac OS X when Qt has framework support, also add the framework path
|
||||
IF( QT_USE_FRAMEWORKS )
|
||||
SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ")
|
||||
ENDIF( QT_USE_FRAMEWORKS )
|
||||
# Check for Window system symbols (note: only one should end up being set)
|
||||
CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
|
||||
CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
|
||||
CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
|
||||
CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
|
||||
IF(Q_WS_MAC)
|
||||
IF(QT_QMAKE_CHANGED)
|
||||
UNSET(QT_MAC_USE_COCOA CACHE)
|
||||
ENDIF(QT_QMAKE_CHANGED)
|
||||
CHECK_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA)
|
||||
ENDIF(Q_WS_MAC)
|
||||
|
||||
IF (QT_QTCOPY_REQUIRED)
|
||||
CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
|
||||
IF (NOT QT_IS_QTCOPY)
|
||||
MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
|
||||
ENDIF (NOT QT_IS_QTCOPY)
|
||||
ENDIF (QT_QTCOPY_REQUIRED)
|
||||
|
||||
# Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
|
||||
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
|
||||
#
|
||||
#############################################
|
||||
|
||||
|
||||
|
||||
########################################
|
||||
#
|
||||
# Setting the INCLUDE-Variables
|
||||
|
@ -578,8 +619,12 @@ IF (QT4_QMAKE_FOUND)
|
|||
########################################
|
||||
|
||||
SET(QT_MODULES QtCore QtGui Qt3Support QtSvg QtScript QtTest QtUiTools
|
||||
QtHelp QtWebKit QtXmlPatterns phonon QtMotif QtNetwork
|
||||
QtHelp QtWebKit QtXmlPatterns phonon QtNetwork
|
||||
QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools)
|
||||
|
||||
IF(Q_WS_X11)
|
||||
SET(QT_MODULES ${QT_MODULES} QtMotif)
|
||||
ENDIF(Q_WS_X11)
|
||||
|
||||
IF(QT_QMAKE_CHANGED)
|
||||
FOREACH(QT_MODULE ${QT_MODULES})
|
||||
|
@ -683,44 +728,6 @@ IF (QT4_QMAKE_FOUND)
|
|||
SET( QT_INCLUDES ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} )
|
||||
|
||||
|
||||
#############################################
|
||||
#
|
||||
# Find out what window system we're using
|
||||
#
|
||||
#############################################
|
||||
# Save required variable
|
||||
SET(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
|
||||
SET(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
|
||||
# Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
|
||||
SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}")
|
||||
# On Mac OS X when Qt has framework support, also add the framework path
|
||||
IF( QT_USE_FRAMEWORKS )
|
||||
SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ")
|
||||
ENDIF( QT_USE_FRAMEWORKS )
|
||||
# Check for Window system symbols (note: only one should end up being set)
|
||||
CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
|
||||
CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
|
||||
CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
|
||||
CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
|
||||
IF(Q_WS_MAC)
|
||||
IF(QT_QMAKE_CHANGED)
|
||||
UNSET(QT_MAC_USE_COCOA CACHE)
|
||||
ENDIF(QT_QMAKE_CHANGED)
|
||||
CHECK_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA)
|
||||
ENDIF(Q_WS_MAC)
|
||||
|
||||
IF (QT_QTCOPY_REQUIRED)
|
||||
CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
|
||||
IF (NOT QT_IS_QTCOPY)
|
||||
MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
|
||||
ENDIF (NOT QT_IS_QTCOPY)
|
||||
ENDIF (QT_QTCOPY_REQUIRED)
|
||||
|
||||
# Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
|
||||
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
|
||||
#
|
||||
#############################################
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue