CMake: Fix textballoon example when using a static Qt

Don't pre-create a qml module backing library, don't link to it
directly and instead rely on regular qml plugin loading.

This avoids undefined linker errors.

Amends 79cae5f652

Pick-to: 6.2
Fixes: QTBUG-96805
Change-Id: I77acd086257e27e1933e9b36d7f0212765afceb3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2021-09-23 16:55:11 +02:00
parent edc4357ae4
commit d73f98b1b5
2 changed files with 1 additions and 2 deletions

View File

@ -28,8 +28,8 @@ target_link_libraries(painteditemexample PRIVATE
Qt::Gui
Qt::Qml
Qt::Quick
qmltextballoon
)
add_dependencies(painteditemexample qmltextballoon)
install(TARGETS painteditemexample
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"

View File

@ -1,6 +1,5 @@
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/customitems/painteditem/TextBalloon")
qt_add_library(qmltextballoon)
qt_add_qml_module(qmltextballoon
VERSION 1.0
URI "TextBalloon"