aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/Qt6QmlMacros.cmake
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-09-24 13:16:29 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-09-24 11:31:08 +0000
commit662c5ec31d7c1670af3ce885cd2dab7ffa2dc613 (patch)
tree27b1e10b939e1d9280808ef364ab7596503736a0 /src/qml/Qt6QmlMacros.cmake
parentcaa062e30a719911d88c9197c4783f5bff50f044 (diff)
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 <alexandru.croitor@qt.io>
Diffstat (limited to 'src/qml/Qt6QmlMacros.cmake')
-rw-r--r--src/qml/Qt6QmlMacros.cmake10
1 files changed, 5 insertions, 5 deletions
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()