diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake index 67e9bb19f0d..b853e9c4be8 100644 --- a/cmake/QtCreatorAPIInternal.cmake +++ b/cmake/QtCreatorAPIInternal.cmake @@ -363,10 +363,18 @@ function(find_dependent_plugins varName) if(NOT TARGET ${i}) continue() endif() - set(_dep) - get_property(_dep TARGET "${i}" PROPERTY QTC_PLUGIN_DEPENDS) - if (_dep) - find_dependent_plugins(_REC ${_dep}) + set(_deps) + get_property(_deps TARGET "${i}" PROPERTY QTC_PLUGIN_DEPENDS) + if (_deps) + set(_fixed_deps "") + foreach(_dep ${_deps}) + if(NOT TARGET ${_dep} AND TARGET "QtCreator::${_dep}") + list(APPEND _fixed_deps "QtCreator::${_dep}") + else() + list(APPEND _fixed_deps ${_dep}) + endif() + endforeach() + find_dependent_plugins(_REC ${_fixed_deps}) list(APPEND _RESULT ${_REC}) endif() endforeach()