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()
|
endmacro()
|
||||||
|
|
||||||
macro(_qt4_add_target_depends _QT_MODULE)
|
macro(_qt4_add_target_depends _QT_MODULE)
|
||||||
get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
|
if (TARGET Qt4::${_QT_MODULE})
|
||||||
_qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN})
|
get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
|
||||||
foreach(_config ${_configs})
|
_qt4_add_target_depends_internal(${_QT_MODULE} INTERFACE_LINK_LIBRARIES ${ARGN})
|
||||||
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN})
|
foreach(_config ${_configs})
|
||||||
endforeach()
|
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} ${ARGN})
|
||||||
set(_configs)
|
endforeach()
|
||||||
|
set(_configs)
|
||||||
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(_qt4_add_target_private_depends _QT_MODULE)
|
macro(_qt4_add_target_private_depends _QT_MODULE)
|
||||||
get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
|
if (TARGET Qt4::${_QT_MODULE})
|
||||||
foreach(_config ${_configs})
|
get_target_property(_configs Qt4::${_QT_MODULE} IMPORTED_CONFIGURATIONS)
|
||||||
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} ${ARGN})
|
foreach(_config ${_configs})
|
||||||
endforeach()
|
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config} ${ARGN})
|
||||||
set(_configs)
|
endforeach()
|
||||||
|
set(_configs)
|
||||||
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user