Fix QMAKE_PRL_LIBS entries on Windows for modules from other repos

When building a repository != qtbase, like qtactiveqt, QMAKE_PRL_LIBS
contained entries like Qt6Core and Qt6Widgets, meaning the linker line
would contain exactly these arguments.

When building an activeqt example with qmake, the link then failed with
"LNK1181: cannot open input file 'Qt6Widgets.obj'".

The correct entry would have been $$[QT_INSTALL_LIBS]/Qt6Widgets.obj.

Fix this by determining the full path to the import library in the first
step of the prl generation. This enables QtFinishPrlFile.cmake to
recognize Qt6Widgets as Qt module and generate the right QMAKE_PRL_LIBS
entry.

Pick-to: 6.0
Fixes: QTBUG-90520
Change-Id: Id0d9178da0e0dfc3ea4fadbbe8f5900d792ffc84
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
Joerg Bornemann 2021-01-21 15:31:09 +01:00
parent 88e24e6a25
commit 1ef5016bab

View File

@ -188,7 +188,7 @@ function(qt_internal_walk_libs
qt_merge_libs(rcc_objects ${lib_rcc_objects_${target}})
endif()
else()
qt_merge_libs(libs "$<TARGET_FILE:${lib_target}>")
qt_merge_libs(libs "$<TARGET_LINKER_FILE:${lib_target}>")
get_target_property(target_rcc_objects "${lib_target}" _qt_rcc_objects)
if(target_rcc_objects)