Commit b94ecab6 authored by Clinton Stimpson's avatar Clinton Stimpson

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.
parent 6e6fbb0e
......@@ -98,7 +98,9 @@ foreach(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
include_directories(SYSTEM ${QT_${module}_INCLUDE_DIR})
endif(QT_INCLUDE_DIRS_NO_SYSTEM)
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})
if(QT_IS_STATIC)
set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment