FindQt4: prevent overlinking when using UseQt4.cmake.

Now it only links with the Qt libraries specified by the user,
instead of automatically including all dependencies.
Fixes #14750 and thanks to Orion Poplawski.
This commit is contained in:
Clinton Stimpson 2014-02-26 10:53:53 -07:00
parent 6e6fbb0e43
commit b94ecab6d6
1 changed files with 3 additions and 1 deletions

View File

@ -98,7 +98,9 @@ foreach(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
include_directories(SYSTEM ${QT_${module}_INCLUDE_DIR}) include_directories(SYSTEM ${QT_${module}_INCLUDE_DIR})
endif(QT_INCLUDE_DIRS_NO_SYSTEM) endif(QT_INCLUDE_DIRS_NO_SYSTEM)
endif() endif()
set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY}) if(QT_USE_${module} OR QT_IS_STATIC)
set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY})
endif()
set(QT_LIBRARIES_PLUGINS ${QT_LIBRARIES_PLUGINS} ${QT_${module}_PLUGINS}) set(QT_LIBRARIES_PLUGINS ${QT_LIBRARIES_PLUGINS} ${QT_${module}_PLUGINS})
if(QT_IS_STATIC) if(QT_IS_STATIC)
set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES}) set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES})