CMake: Fix Gui package to auto look up IntegrityPlatformGraphics
When building non-qtbase tqtc repos in CI, we don't load a lot of Plugin Config files in static builds due to project names having a tqtc- prefix. This is similar to the issue and workaround that was done in 4c6292686259e4e232f29cb6fd6c79065e9fa96d for qtserialport. The specific issue here is the following error: CMake Error at Qt6Gui/Qt6GuiTargets.cmake:61 (set_target_properties): The link interface of target "Qt6::Gui" contains: IntegrityPlatformGraphics::IntegrityPlatformGraphics but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing. Call Stack (most recent call first): /home/qt/work/install/target/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:52 (include) /home/qt/work/install/target/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package) CMakeLists.txt:15 (find_package) To work around the issue, explicitly record a dependency on the IntegrityPlatformGraphics target for Gui when building on INTEGRITY. The underlying issue is sadly still not fixed. Change-Id: I9a9cff05d036f224aab8083ad6bc8b8e568abd8b Task-number: QTBUG-102883 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io> (cherry picked from commit c03eb94c8a4c776a0315acc35538b3954e031222) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
c17a1432cf
commit
efcf1cdeed
@ -336,7 +336,8 @@ if(QT_FEATURE_opengl)
|
||||
target_link_libraries(Gui PUBLIC GLESv2::GLESv2)
|
||||
|
||||
if(INTEGRITY AND _qt_igy_gui_libs)
|
||||
find_package(IntegrityPlatformGraphics)
|
||||
qt_find_package(IntegrityPlatformGraphics
|
||||
PROVIDED_TARGETS IntegrityPlatformGraphics::IntegrityPlatformGraphics)
|
||||
target_link_libraries(Gui
|
||||
INTERFACE $<LINK_ONLY:IntegrityPlatformGraphics::IntegrityPlatformGraphics>)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user