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>