summaryrefslogtreecommitdiffstats
path: root/Modules/UseQt4.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2014-02-26 17:53:53 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2014-02-26 17:55:38 (GMT)
commitb94ecab6d6540512df5e7c11deb9d168566d346f (patch)
tree30b504a10a7935a853b6e6e76656e27f6773bff2 /Modules/UseQt4.cmake
parent6e6fbb0e436889c93bb64930fda51a1ef32326ae (diff)
downloadCMake-b94ecab6d6540512df5e7c11deb9d168566d346f.zip
CMake-b94ecab6d6540512df5e7c11deb9d168566d346f.tar.gz
CMake-b94ecab6d6540512df5e7c11deb9d168566d346f.tar.bz2
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.
Diffstat (limited to 'Modules/UseQt4.cmake')
-rw-r--r--Modules/UseQt4.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index 7478310..cba22af 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -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})