After 4dce218ac400afcb54aa2a85a0b27947fec583cb got merged, we started
considering the INTERFACE_LINK_LIBRARIES property of UNKNOWN_LIBRARY
targets in addition to INTERFACE_LIBRARY targets, when collecting
dependencies for pri file generation.
These can contain genexes like $<LINK_ONLY:...> or
$<TARGET_OBJECTS:...>, which are not supported by file(GENERATE),
or special directory scope tokens like ::@, which are not valid
targets or library names.
One such case was in the downstream vcpkg build of Qt which adds
`$<LINK_ONLY:EXPAT::EXPAT>` to the INTERFACE_LINK_LIBRARIES of the
Fontconfig::Fontconfig target.
We strip or handle these cases for prl file generation as part of
calling __qt_internal_walk_libs.
Change the pri generation to handle them in a similar manner by copying
over the same logic.
Amends 4dce218ac400afcb54aa2a85a0b27947fec583cb
Fixes: QTBUG-129471
Change-Id: Id4a574ee2411f6d64179c419f352168fde1914d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 93df3de1f30b6f65b025b33e9cd73ad479295e59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>