| 1 |
# Reference: https://doc.qt.io/qt-6/qt-query-qml-module.html |
| 2 |
# Installs the specified QML component to ${QML_INSTALL_DIR}. |
| 3 |
function(install_qml_module target) |
| 4 |
qt_query_qml_module(${target} |
| 5 |
URI module_uri |
| 6 |
VERSION module_version |
| 7 |
PLUGIN_TARGET module_plugin_target |
| 8 |
TARGET_PATH module_target_path |
| 9 |
QMLDIR module_qmldir |
| 10 |
TYPEINFO module_typeinfo |
| 11 |
QML_FILES module_qml_files |
| 12 |
QML_FILES_DEPLOY_PATHS qml_files_deploy_paths |
| 13 |
RESOURCES module_resources |
| 14 |
RESOURCES_DEPLOY_PATHS resources_deploy_paths |
| 15 |
) |
| 16 |
|
| 17 |
set(install_dir "${QML_INSTALL_DIR}/${module_target_path}") |
| 18 |
|
| 19 |
# Install the plugin and the generated qmldir/typeinfo files |
| 20 |
install(TARGETS ${module_plugin_target} DESTINATION "${install_dir}") |
| 21 |
install(FILES "${module_qmldir}" DESTINATION "${install_dir}") |
| 22 |
if(DEFINED module_typeinfo) |
| 23 |
install(FILES "${module_typeinfo}" DESTINATION "${install_dir}") |
| 24 |
endif() |
| 25 |
endfunction() |
| 26 |
|
| 27 |
add_subdirectory(Components) |
| 28 |
add_subdirectory(Layouts) |
| 29 |
add_subdirectory(Metrics) |
| 30 |
add_subdirectory(PerformanceMetrics) |
| 31 |
add_subdirectory(Test) |
| 32 |
add_subdirectory(SystemInfo) |