diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2008-05-19 22:07:00 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2008-05-19 22:07:00 (GMT) |
commit | e8af880a7d2ef3be281a8ab00f0e585bb1567ff7 (patch) | |
tree | ab16bfddb2477ebf067708dbe4f4db3ab48e2e1e /Modules/UseQt4.cmake | |
parent | e0b26f4aea8357d9e90ac5609376ba3fd380c02b (diff) | |
download | CMake-e8af880a7d2ef3be281a8ab00f0e585bb1567ff7.zip CMake-e8af880a7d2ef3be281a8ab00f0e585bb1567ff7.tar.gz CMake-e8af880a7d2ef3be281a8ab00f0e585bb1567ff7.tar.bz2 |
ENH: Similar to how qmake does it...
Don't add compile flags for dependent modules the user didn't specify.
But still add the link libs. This reduces the number of
unecessary compile flags.
Diffstat (limited to 'Modules/UseQt4.cmake')
-rw-r--r-- | Modules/UseQt4.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake index 1a60714..495b999 100644 --- a/Modules/UseQt4.cmake +++ b/Modules/UseQt4.cmake @@ -36,7 +36,7 @@ IF (QT_USE_QT3SUPPORT) ADD_DEFINITIONS(-DQT3_SUPPORT) ENDIF (QT_USE_QT3SUPPORT) -# list dependent modules, so their modules are automatically on +# list dependent modules, so dependent libraries are added SET(QT_QT3SUPPORT_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE) SET(QT_QTSVG_MODULE_DEPENDS QTGUI QTXML QTCORE) SET(QT_QTUITOOLS_MODULE_DEPENDS QTGUI QTXML QTCORE) @@ -50,7 +50,7 @@ FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN QTSCRIPT QTSVG QTUITOOLS QTHELP QTWEBKIT PHONON QTGUI QTTEST QTDBUS QTXML QTSQL QTXMLPATTERNS QTNETWORK QTCORE) - IF (QT_USE_${module}) + IF (QT_USE_${module} OR QT_USE_${module}_DEPENDS) IF (QT_${module}_FOUND) IF(QT_USE_${module}) STRING(REPLACE "QT" "" qt_module_def "${module}") @@ -59,12 +59,12 @@ FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN ENDIF(QT_USE_${module}) SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY} ${QT_${module}_LIB_DEPENDENCIES}) FOREACH(depend_module ${QT_${module}_MODULE_DEPENDS}) - SET(QT_USE_${depend_module} 1) + SET(QT_USE_${depend_module}_DEPENDS 1) ENDFOREACH(depend_module ${QT_${module}_MODULE_DEPENDS}) ELSE (QT_${module}_FOUND) MESSAGE("Qt ${module} library not found.") ENDIF (QT_${module}_FOUND) - ENDIF (QT_USE_${module}) + ENDIF (QT_USE_${module} OR QT_USE_${module}_DEPENDS) ENDFOREACH(module) |