From 9c4295978eff1408fc3880000717508d738973ee Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 13 Mar 2018 08:14:07 +0100 Subject: [PATCH] qml_module.prf: add 'install_qml_files' config Allow QML modules to request installing QML files on the file system regardless of whether the QML files are embedded to resources. Qt Quick Controls need both; external QML files, that are prioritized over compiled resources, can be left out from the final deployment package. The desired setup can be configured as follows: CONFIG += install_qml_files builtin_resources qtquickcompiler With this, there is no need to write custom install/copy/qrc rules for QML files. Change-Id: I2ff2974b64efaea341b6ebb4c9fc2612497d7a33 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qml_module.prf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index dfd4c736d2..65212b2abf 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -31,7 +31,10 @@ qml1_target { instbase = $$[QT_INSTALL_QML] } -!qml1_target:static: CONFIG += builtin_resources +!qml1_target:static: \ + CONFIG += builtin_resources +else: \ + CONFIG += install_qml_files builtin_resources { URITARGET = $$replace(URI, "\\.", "_") @@ -48,7 +51,7 @@ builtin_resources { qmldir.base = $$_PRO_FILE_PWD_ # Tools need qmldir and plugins.qmltypes always installed on the file system qmldir.files = $$qmldir_file $$fq_aux_qml_files -!builtin_resources: qmldir.files += $$fq_qml_files +install_qml_files: qmldir.files += $$fq_qml_files qmldir.path = $$instbase/$$TARGETPATH INSTALLS += qmldir