QtQml

Installing QML modules the way Qt lays them out.

qm_install_qml_modules

Installs a QML module and its runtime loadable plugin, meta information, QML files, and resources. The module is identified by the given target name.

The Qt version should be greater than or equal to 6.3.

qm_install_qml_modules(target
    [PREFIX prefix]
)
PREFIX

install directory prefix (default: “qml”)

Note

For static library backing targets, you should specify OUTPUT_TARGETS when calling qt_add_qml_module() to collect the internally generated targets (mainly object libraries), and then install them by calling:

install(TARGETS ${_output_targets}
    EXPORT <target set>
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib
    OBJECTS DESTINATION lib
)

Where this page comes from

The comments in cmake/modules/QtQml.cmake, which is what to change.