- 
    Suggestion 
- 
    Resolution: Unresolved
- 
    P3: Somewhat important 
- 
    None
- 
    None
There can be cases where you need to define your own intializeEngine, to e.g. expose an enum to JS:
https://doc-snapshots.qt.io/qt6-dev/qtquick-how-tos.html#use-a-c-enum-in-javascript
https://doc.qt.io/qt-6/qtqml-writing-a-module.html almost shows how to do this in CMake, but:
The plugin and the backing library both are in the same CMake target imageproviderplugin
For the scenario where they are separate targets, the user needs to do something like this:
https://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/quick/CMakeLists.txt#n257
Except they'll need to use target_sources to add the plugin's .cpp file to the plugin target:
target_sources(MyModuleplugin PUBLIC
    Plugin.cpp
)