qt5base-lts/examples
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
..
aggregate install a sane top-level examples.pro file 2012-12-11 13:37:57 +01:00
corelib Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
dbus Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
embedded Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
gui Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
network Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
opengl Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
qmake Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
qpa Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
qtconcurrent Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
qtestlib Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
sql Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
vulkan Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
widgets CMake: Create plugin initializers for static user plugins 2021-08-24 16:10:31 +02:00
xml Raise cmake_minimum_required to VERSION 3.16 in examples 2021-08-17 19:18:54 +02:00
CMakeLists.txt Build examples in isolated sub-builds using ExternalProject 2021-05-26 13:33:29 +02:00
examples.pro Turn off the dbus examples for qmake-generated VS projects 2021-02-09 15:45:06 +01:00
README Remove more references to demos. 2011-07-08 15:36:26 +02:00

Qt is supplied with a number of example applications that have been
written to provide developers with examples of the Qt API in use,
highlight good programming practice, and showcase features found in each of
Qt's core technologies.


Documentation for examples can be found in the Examples section
of the Qt documentation.