diff options
author | Brad King <brad.king@kitware.com> | 2013-03-04 20:40:03 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-03-04 20:40:03 (GMT) |
commit | caf3f07b834e466e34e7f5e0669208ce8e6e5151 (patch) | |
tree | 903fe1aba61fd07f2427ae2b70cc9441f9c55bd9 /Modules | |
parent | f954bb3d993e03116528ec3ace62719a8000e9d7 (diff) | |
parent | 4d5230d1d85a910f04cd2618decc5402023d00ff (diff) | |
download | CMake-caf3f07b834e466e34e7f5e0669208ce8e6e5151.zip CMake-caf3f07b834e466e34e7f5e0669208ce8e6e5151.tar.gz CMake-caf3f07b834e466e34e7f5e0669208ce8e6e5151.tar.bz2 |
Merge topic 'non-fatal-Qt4-missing-targets'
4d5230d Only add existing targets to the Qt4 target depends properties.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindQt4.cmake | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 078c031..f25e121 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -965,13 +965,17 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) macro(_qt4_add_target_depends_internal _QT_MODULE _PROPERTY) if (TARGET Qt4::${_QT_MODULE}) foreach(_DEPEND ${ARGN}) - if (NOT TARGET Qt4::Qt${_DEPEND}) - message(FATAL_ERROR "_qt4_add_target_depends invoked with invalid arguments") + set(_VALID_DEPENDS) + if (TARGET Qt4::Qt${_DEPEND}) + list(APPEND _VALID_DEPENDS Qt4::Qt${_DEPEND}) endif() - set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY - ${_PROPERTY} - "Qt4::Qt${_DEPEND}" - ) + if (_VALID_DEPENDS) + set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY + ${_PROPERTY} + "${_VALID_DEPENDS}" + ) + endif() + set(_VALID_DEPENDS) endforeach() endif() endmacro() |