Details
-
User Story
-
Resolution: Done
-
P1: Critical
-
None
-
None
-
None
Description
As uncovered by the failing qtquickcontrols2 tst_focus, we don't correctly handle QT_PRIVATE assignments when converting to CMake.
Any module that has QT_PRIVATE += opengl-private assignment we currently interpret as
qt_extend_target(Quick LIBRARIES Qt::OpenGLPrivate)
which under the hood in a loop in qt_extend_target makes QuickPrivate depend on OpenGLPrivate, which is incorrect.
Instead we need to change pro2cmake to generate code like his for the following .pro snippet:
TARGET = quick QT += gui-private QT_PRIVATE += opengl-private # Make Quick depend on QuickPrivate privately in add_qt_module(Quick) in QtBuild.cmake, and do the following target_link_libraries(QuickPrivate INTERFACE Qt::GuiPrivate ) target_link_libraries(Quick PRIVATE Qt::OpenGLPrivate )
Note the usage of a simple target_link_libraries instead of qt_extend_target.
Attachments
For Gerrit Dashboard: QTBUG-81780 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
289026,5 | pro2cmake: Handle QT += core-private correctly for modules | wip/cmake | qt/qtbase | Status: MERGED | -1 | 0 |