From 662c5ec31d7c1670af3ce885cd2dab7ffa2dc613 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Tue, 24 Sep 2019 13:16:29 +0200 Subject: Allow instalation of qml files with SKIP_TYPE_REGISTRATION Always allow the user to install qml files when the QT_QML_SOURCE_INSTALL property is set, regardless of whether SKIP_TYPE_REGISTRATION is present. Change-Id: I2a868c069ce2f8b1d6187393828c3977cd3d0c2a Reviewed-by: Alexandru Croitor --- src/qml/Qt6QmlMacros.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/qml/Qt6QmlMacros.cmake') diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake index 62117e2e15..be4d3c62fb 100644 --- a/src/qml/Qt6QmlMacros.cmake +++ b/src/qml/Qt6QmlMacros.cmake @@ -368,6 +368,11 @@ function(qt6_target_qml_files target) set(file_contents "") foreach(qml_file IN LISTS arg_FILES) + get_source_file_property(qml_file_install ${qml_file} QT_QML_SOURCE_INSTALL) + if (qml_file_install) + install(FILES ${qml_file} DESTINATION ${qml_module_install_dir}) + endif() + if (skip_type_registration AND qml_file MATCHES "\\.qml$") continue() endif() @@ -375,7 +380,6 @@ function(qt6_target_qml_files target) get_source_file_property(qml_file_typename ${qml_file} QT_QML_SOURCE_TYPENAME) get_source_file_property(qml_file_singleton ${qml_file} QT_QML_SINGLETON_TYPE) get_source_file_property(qml_file_internal ${qml_file} QT_QML_INTERNAL_TYPE) - get_source_file_property(qml_file_install ${qml_file} QT_QML_SOURCE_INSTALL) get_target_property(qml_module_version ${target} QT_QML_MODULE_VERSION) if (NOT qml_file_version) @@ -396,10 +400,6 @@ function(qt6_target_qml_files target) string(APPEND file_contents "internal ${qml_file_typename} ${qml_file}\n") endif() - if (qml_file_install) - install(FILES ${qml_file} DESTINATION ${qml_module_install_dir}) - endif() - endforeach() file(APPEND ${qmldir_file} ${file_contents}) endfunction() -- cgit v1.2.3