qt5base-lts/examples/widgets
Alexandru Croitor 3c1125d9fe CMake: Create plugin initializers for static user plugins
Previously we only created object library static plugin initializers
for Qt plugins only, not user-project plugins.

The reason was that if a user tried to install the plugin target via
an export set, CMake would error out saying that the _init library is
not part of the same export set.

Introduce an OUTPUT_TARGETS option that would allow projects to get
the name of the generated _init target, so they can install it if
needed.
This was already done for qt6_add_qml_module, so we just introduce the
same option for qt6_add_plugin.

Now user static plugins will have an _init target created, which will
be propagated to consumers whenever the consumers link against the
plugin itself.

We also need an internal option to disable this propagation, because
it's handled a bit differently for Qt plugins which can be linked
either via finalizers or via usage requirements.

Amends 91c65dd80c

As a result of the implementation change, cleanup example projects
to ensure that they build successfully (the important part is
specifying the CLASS_NAME).

Only plugandpaint works properly with both shared and static Qt
builds.

echoplugin works with a shared Qt build, but not a static one due to
some assumptions in the C++ code about shared plugins.

styleplugin doesn't seem to work properly neither with shared Qt
builds nor static Qt builds, at least on macOS. But it builds fine.
For some reason even if the plugin is found, the style is not applied.

Amends 4caac1feea

Pick-to: 6.2
Task-number: QTBUG-80863
Task-number: QTBUG-92933
Change-Id: I6f631cda9566229b7a63992b23d7d7fa50303eeb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-08-24 16:10:31 +02:00
..
animation Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
desktop Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
dialogs Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
doc Regular Expression example: Brush up and add a way to preview replacements 2021-06-01 21:54:35 +00:00
draganddrop Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
effects Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
gallery Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
gestures Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
graphicsview Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
itemviews Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
layouts Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
mainwindows Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
painting Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
qnx/foreignwindows Use QList instead of QVector in statemachine 2020-07-06 14:06:13 +02:00
richtext Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
scroller Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
tools CMake: Create plugin initializers for static user plugins 2021-08-24 16:10:31 +02:00
touch Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
tutorials Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
widgets Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
windowcontainer Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
.prev_CMakeLists.txt CMake: Regenerate projects 2020-09-22 19:08:53 +02:00
CMakeLists.txt Build examples in isolated sub-builds using ExternalProject 2021-05-26 13:33:29 +02:00
widgets.pro Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00