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 <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
defe266fd0
commit
9c4295978e
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user