ENH: Add support for new modules in Qt 4.4. Fixes #6316.

Simplify and clarify some documentation.

BUG:  Fix order of include paths (from KDE's FindQt4)
      Fix find of Designer components debug library on Windows.
This commit is contained in:
Clinton Stimpson 2008-03-13 15:29:28 -04:00
parent 3e997c9fc8
commit 7634b36364
1 changed files with 117 additions and 106 deletions

View File

@ -24,9 +24,14 @@
# QT_USE_QTUITOOLS
# QT_USE_QTDBUS
# QT_USE_QTSCRIPT
# QT_USE_QTASSISTANTCLIENT
# QT_USE_QTHELP
# QT_USE_QTWEBKIT
# QT_USE_QTXMLPATTERNS
#
# All the libraries required are stored in a variable called QT_LIBRARIES.
# Add this variable to your TARGET_LINK_LIBRARIES.
# Add this variable to your TARGET_LINK_LIBRARIES. Inlcudes and definitions
# needed for compiling Qt code is already set up by including the QT_USE_FILE.
#
# macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
# create moc code from a list of files containing Qt class with
@ -111,6 +116,10 @@
# QT_QTSCRIPT_FOUND True if QtScript was found.
# QT_QTTEST_FOUND True if QtTest was found.
# QT_QTUITOOLS_FOUND True if QtUiTools was found.
# QT_QTASSISTANTCLIENT_FOUND True if QtAssistantClient was found.
# QT_QTHELP_FOUND True if QtHelp was found.
# QT_QTWEBKIT_FOUND True if QtWebKit was found.
# QT_QTXMLPATTERNS_FOUND True if QtXmlPatterns was found.
#
# QT_DEFINITIONS Definitions to use when compiling code that uses Qt.
#
@ -138,88 +147,41 @@
# QT_QTSVG_INCLUDE_DIR Path to "include/QtSvg"
# QT_QTSCRIPT_INCLUDE_DIR Path to "include/QtScript"
# QT_QTTEST_INCLUDE_DIR Path to "include/QtTest"
# QT_QTASSISTANTCLIENT_INCLUDE_DIR Path to "include/QtAssistant"
# QT_QTHELP_INCLUDE_DIR Path to "include/QtHelp"
# QT_QTWEBKIT_INCLUDE_DIR Path to "include/QtWebKit"
# QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns"
#
# QT_LIBRARY_DIR Path to "lib" of Qt4
#
# QT_PLUGINS_DIR Path to "plugins" for Qt4
#
# For every library of Qt there are three variables:
# QT_QTFOO_LIBRARY_RELEASE, which contains the full path to the release version, if it exists
# QT_QTFOO_LIBRARY_DEBUG, which contains the full path to the debug version, if it exists
# QT_QTFOO_LIBRARY, the full path to the release and/or debug version
#
# So there are the following variables:
# The Qt3Support library: QT_QT3SUPPORT_LIBRARY
# QT_QT3SUPPORT_LIBRARY_RELEASE
# QT_QT3SUPPORT_DEBUG
# The Qt toolkit may contain both debug and release libraries.
# In that case, the following library variables will contain both.
#
# The QtAssistant library: QT_QTASSISTANT_LIBRARY
# QT_QTASSISTANT_LIBRARY_RELEASE
# QT_QTASSISTANT_LIBRARY_DEBUG
#
# The QtCore library: QT_QTCORE_LIBRARY
# QT_QTCORE_LIBRARY_RELEASE
# QT_QTCORE_LIBRARY_DEBUG
#
# The QtDBus library: QT_QTDBUS_LIBRARY
# QT_QTDBUS_LIBRARY_RELEASE
# QT_QTDBUS_LIBRARY_DEBUG
#
# The QtDesigner library: QT_QTDESIGNER_LIBRARY
# QT_QTDESIGNER_LIBRARY_RELEASE
# QT_QTDESIGNER_LIBRARY_DEBUG
#
# The QtDesignerComponents library: QT_QTDESIGNERCOMPONENTS_LIBRARY
# QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE
# QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG
#
# The QtGui library: QT_QTGUI_LIBRARY
# QT_QTGUI_LIBRARY_RELEASE
# QT_QTGUI_LIBRARY_DEBUG
#
# The QtMotif library: QT_QTMOTIF_LIBRARY
# QT_QTMOTIF_LIBRARY_RELEASE
# QT_QTMOTIF_LIBRARY_DEBUG
#
# The QtNetwork library: QT_QTNETWORK_LIBRARY
# QT_QTNETWORK_LIBRARY_RELEASE
# QT_QTNETWORK_LIBRARY_DEBUG
#
# The QtNsPLugin library: QT_QTNSPLUGIN_LIBRARY
# QT_QTNSPLUGIN_LIBRARY_RELEASE
# QT_QTNSPLUGIN_LIBRARY_DEBUG
#
# The QtOpenGL library: QT_QTOPENGL_LIBRARY
# QT_QTOPENGL_LIBRARY_RELEASE
# QT_QTOPENGL_LIBRARY_DEBUG
#
# The QtSql library: QT_QTSQL_LIBRARY
# QT_QTSQL_LIBRARY_RELEASE
# QT_QTSQL_LIBRARY_DEBUG
#
# The QtXml library: QT_QTXML_LIBRARY
# QT_QTXML_LIBRARY_RELEASE
# QT_QTXML_LIBRARY_DEBUG
#
# The QtSvg library: QT_QTSVG_LIBRARY
# QT_QTSVG_LIBRARY_RELEASE
# QT_QTSVG_LIBRARY_DEBUG
#
# The QtScript library: QT_QTSCRIPT_LIBRARY
# QT_QTSCRIPT_LIBRARY_RELEASE
# QT_QTSCRIPT_LIBRARY_DEBUG
#
# The QtTest library: QT_QTTEST_LIBRARY
# QT_QTTEST_LIBRARY_RELEASE
# QT_QTTEST_LIBRARY_DEBUG
#
# The qtmain library for Windows QT_QTMAIN_LIBRARY
# QT_QTMAIN_LIBRARY_RELEASE
# QT_QTMAIN_LIBRARY_DEBUG
#
# The QtUiTools library: QT_QTUITOOLS_LIBRARY
# QT_QTUITOOLS_LIBRARY_RELEASE
# QT_QTUITOOLS_LIBRARY_DEBUG
# QT_QT3SUPPORT_LIBRARY The Qt3Support library
# QT_QTASSISTANT_LIBRARY The QtAssistant library
# QT_QTCORE_LIBRARY The QtCore library
# QT_QTDBUS_LIBRARY The QtDBus library
# QT_QTDESIGNER_LIBRARY The QtDesigner library
# QT_QTDESIGNERCOMPONENTS_LIBRARY The QtDesignerComponents library
# QT_QTGUI_LIBRARY The QtGui library
# QT_QTMOTIF_LIBRARY The QtMotif library
# QT_QTNETWORK_LIBRARY The QtNetwork library
# QT_QTNSPLUGIN_LIBRARY The QtNsPLugin library
# QT_QTOPENGL_LIBRARY The QtOpenGL library
# QT_QTSQL_LIBRARY The QtSql library
# QT_QTXML_LIBRARY The QtXml library
# QT_QTSVG_LIBRARY The QtSvg library
# QT_QTSCRIPT_LIBRARY The QtScript library
# QT_QTTEST_LIBRARY The QtTest library
# QT_QTMAIN_LIBRARY The qtmain library for Windows
# QT_QTUITOOLS_LIBRARY The QtUiTools library
# QT_QTASSISTANTCLIENT_LIBRARY The QtAssistantClient library
# QT_QTHELP_LIBRARY The QtHelp library
# QT_QTWEBKIT_LIBRARY The QtWebKit library
# QT_QTXMLPATTERNS_LIBRARY The QtXmlPatterns library
#
# also defined, but NOT for general use are
# QT_MOC_EXECUTABLE Where to find the moc tool.
@ -546,11 +508,12 @@ IF (QT4_QMAKE_FOUND)
NO_DEFAULT_PATH
)
# Set QT_QTMOTIF_INCLUDE_DIR
IF(Q_WS_X11)
FIND_PATH(QT_QTMOTIF_INCLUDE_DIR QtMotif PATHS ${QT_INCLUDE_DIR}/QtMotif NO_DEFAULT_PATH )
FIND_PATH(QT_QTMOTIF_INCLUDE_DIR QtMotif
PATHS
${QT_INCLUDE_DIR}/QtMotif
NO_DEFAULT_PATH )
ENDIF(Q_WS_X11)
# Set QT_QTNETWORK_INCLUDE_DIR
@ -597,7 +560,6 @@ IF (QT4_QMAKE_FOUND)
FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant
PATHS
${QT_INCLUDE_DIR}/QtAssistant
${QT_HEADERS_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
NO_DEFAULT_PATH
)
@ -606,7 +568,6 @@ IF (QT4_QMAKE_FOUND)
FIND_PATH(QT_QTDESIGNER_INCLUDE_DIR QDesignerComponents
PATHS
${QT_INCLUDE_DIR}/QtDesigner
${QT_HEADERS_DIR}/QtDesigner
${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
NO_DEFAULT_PATH
)
@ -615,16 +576,46 @@ IF (QT4_QMAKE_FOUND)
FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
PATHS
${QT_INCLUDE_DIR}/QtDesigner
${QT_HEADERS_DIR}/QtDesigner
${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTDBUS_INCLUDE_DIR
FIND_PATH(QT_QTDBUS_INCLUDE_DIR QtDBus
PATHS
${QT_INCLUDE_DIR}/QtDBus
${QT_HEADERS_DIR}/QtDBus
NO_DEFAULT_PATH
)
# Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QtAssistantClient
PATHS
${QT_INCLUDE_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTHELP_INCLUDE_DIR
FIND_PATH(QT_QTHELP_INCLUDE_DIR QtHelp
PATHS
${QT_INCLUDE_DIR}/QtHelp
${QT_LIBRARY_DIR}/QtHelp.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTWEBKIT_INCLUDE_DIR
FIND_PATH(QT_QTWEBKIT_INCLUDE_DIR QtWebKit
PATHS
${QT_INCLUDE_DIR}/QtWebKit
${QT_LIBRARY_DIR}/QtWebKit.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTXMLPATTERNS_INCLUDE_DIR
FIND_PATH(QT_QTXMLPATTERNS_INCLUDE_DIR QtXmlPatterns
PATHS
${QT_INCLUDE_DIR}/QtXmlPatterns
${QT_LIBRARY_DIR}/QtXmlPatterns.framework/Headers
NO_DEFAULT_PATH
)
@ -632,7 +623,7 @@ IF (QT4_QMAKE_FOUND)
MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR QT_PLUGINS_DIR)
# Set QT_INCLUDES
SET( QT_INCLUDES ${QT_INCLUDE_DIR} ${QT_QT_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default )
SET( QT_INCLUDES ${QT_QT_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} )
# Set QT_QTCORE_LIBRARY by searching for a lib with "QtCore." as part of the filename
FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE NAMES QtCore QtCore4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH )
@ -714,7 +705,7 @@ IF (QT4_QMAKE_FOUND)
# Set QT_QTDESIGNERCOMPONENTS_LIBRARY
FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents QtDesignerComponents4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesigner_debug QtDesignerd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents_debug QtDesignerComponentsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTMAIN_LIBRARY
IF(WIN32)
@ -724,6 +715,22 @@ IF (QT4_QMAKE_FOUND)
NO_DEFAULT_PATH)
ENDIF(WIN32)
# Set QT_QTASSISTANTCLIENT_LIBRARY
FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTHELP_LIBRARY
FIND_LIBRARY(QT_QTHELP_LIBRARY_RELEASE NAMES QtHelp QtHelp4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTHELP_LIBRARY_DEBUG NAMES QtHelp_debug QtHelpd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTWEBKIT_LIBRARY
FIND_LIBRARY(QT_QTWEBKIT_LIBRARY_RELEASE NAMES QtWebKit QtWebKit4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTWEBKIT_LIBRARY_DEBUG NAMES QtWebKit_debug QtWebKitd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTXMLPATTERNS_LIBRARY
FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY_RELEASE NAMES QtXmlPatterns QtXmlPatterns4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY_DEBUG NAMES QtXmlPatterns_debug QtXmlPatternsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
############################################
#
# Check the existence of the libraries.
@ -770,7 +777,7 @@ IF (QT4_QMAKE_FOUND)
IF (QT_${basename}_INCLUDE_DIR)
#add the include directory to QT_INCLUDES
SET(QT_INCLUDES ${QT_INCLUDES} "${QT_${basename}_INCLUDE_DIR}")
SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES})
ENDIF (QT_${basename}_INCLUDE_DIR)
# Make variables changeble to the advanced user
@ -796,6 +803,10 @@ IF (QT4_QMAKE_FOUND)
_QT4_ADJUST_LIB_VARS(QTUITOOLS)
_QT4_ADJUST_LIB_VARS(QTTEST)
_QT4_ADJUST_LIB_VARS(QTDBUS)
_QT4_ADJUST_LIB_VARS(QTASSISTANTCLIENT)
_QT4_ADJUST_LIB_VARS(QTHELP)
_QT4_ADJUST_LIB_VARS(QTWEBKIT)
_QT4_ADJUST_LIB_VARS(QTXMLPATTERNS)
# platform dependent libraries
IF(Q_WS_X11)