Fix Qt3D.Core type registration to be called in static builds


The automatically generated type registrations function
qml_register_types_Qt3D_Core was not called in static builds, because
the quick3dcoreplugin target is using a custom
qt3dquick3dcoreplugin.cpp file instead of an auto-generated one.

Types were found correctly in a shared Qt build because the 3DQuick
backing library was loaded by the dynamic plugin at runtime and the
static initializer calling qml_register_types_Qt3D_Core was executed.

In a static build, the linker would discard the
qml_register_types_Qt3D_Core function (and the static initializer)
because nothing was referencing it.

Modify qt3dquick3dcoreplugin.cpp to manually reference the type
registration file, just like an auto-generated source file would do
it.
A Q_IMPORT_PLUGIN(Qt3DQuick3DCorePlugin) which is link directly to
applications via an object file then ensures that registrations
succeeds.

Amends 59fc9cacce5eca68c9dece3c30d6f11ee7693d4e

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-102328
Change-Id: I371b272c7c3a1d21aeeb68f45a26e4186c39c5c9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
commit57fbc3b60f6ade591713092a723dcf696ced734b
parent3e71f4904ddcb9cac06027a0ade35acb02a6b67e
authorAlexandru Croitor <alexandru.croitor@qt.io>
committerAlexandru Croitor <alexandru.croitor@qt.io>
commit timeFri, 17 Jun 2022 12:34:53 +0200