Merge topic 'non-fatal-Qt4-missing-targets'

4d5230d Only add existing targets to the Qt4 target depends properties.
This commit is contained in:
Brad King 2013-03-04 15:40:03 -05:00 committed by CMake Topic Stage
commit caf3f07b83

View File

@ -965,13 +965,17 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
macro(_qt4_add_target_depends_internal _QT_MODULE _PROPERTY) macro(_qt4_add_target_depends_internal _QT_MODULE _PROPERTY)
if (TARGET Qt4::${_QT_MODULE}) if (TARGET Qt4::${_QT_MODULE})
foreach(_DEPEND ${ARGN}) foreach(_DEPEND ${ARGN})
if (NOT TARGET Qt4::Qt${_DEPEND}) set(_VALID_DEPENDS)
message(FATAL_ERROR "_qt4_add_target_depends invoked with invalid arguments") if (TARGET Qt4::Qt${_DEPEND})
list(APPEND _VALID_DEPENDS Qt4::Qt${_DEPEND})
endif() endif()
set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY if (_VALID_DEPENDS)
${_PROPERTY} set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
"Qt4::Qt${_DEPEND}" ${_PROPERTY}
) "${_VALID_DEPENDS}"
)
endif()
set(_VALID_DEPENDS)
endforeach() endforeach()
endif() endif()
endmacro() endmacro()