diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2009-11-17 19:44:33 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2009-11-17 19:44:33 (GMT) |
commit | f756b73ac529b74e9893290d25048969c57d96e1 (patch) | |
tree | e85a7a998559b9f4bed2c8d697a8ef6608065f08 /Modules/FindQt4.cmake | |
parent | 184a3418e65bdfccb5d01c4d8611821df85a1618 (diff) | |
download | CMake-f756b73ac529b74e9893290d25048969c57d96e1.zip CMake-f756b73ac529b74e9893290d25048969c57d96e1.tar.gz CMake-f756b73ac529b74e9893290d25048969c57d96e1.tar.bz2 |
Don't search for QtMotif on all platforms - only on X11.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r-- | Modules/FindQt4.cmake | 85 |
1 files changed, 46 insertions, 39 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 1233faf..fb7a619 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -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}) - # - ############################################# |