FindQt4: Ensure target exists before calling get_target_property.
This macro is called for all potential Qt targets, even those which were not found.
This commit is contained in:
parent
37ebeb9100
commit
ab9f58f657
|
@ -1178,20 +1178,24 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
|
|||
endmacro()
|
||||
|
||||
macro(_qt4_add_target_depends _QT_MODULE)
|
||||
get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
|
||||
_qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN})
|
||||
foreach(_config ${_configs})
|
||||
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN})
|
||||
endforeach()
|
||||
set(_configs)
|
||||
if (TARGET Qt4::${_QT_MODULE})
|
||||
get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
|
||||
_qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN})
|
||||
foreach(_config ${_configs})
|
||||
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN})
|
||||
endforeach()
|
||||
set(_configs)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(_qt4_add_target_private_depends _QT_MODULE)
|
||||
get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
|
||||
foreach(_config ${_configs})
|
||||
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} ${ARGN})
|
||||
endforeach()
|
||||
set(_configs)
|
||||
if (TARGET Qt4::${_QT_MODULE})
|
||||
get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
|
||||
foreach(_config ${_configs})
|
||||
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} ${ARGN})
|
||||
endforeach()
|
||||
set(_configs)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue