diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-10 22:58:43 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-17 15:45:51 +0000 |
commit | 0295984786027eed9ac433592794300e7b2546f8 (patch) | |
tree | 9d62864709c1e44230f8f9452d2940129ee31805 /mkspecs | |
parent | faadf0d8f4eeec26fe24f667338ed1c122b88baa (diff) | |
download | qtbase-0295984786027eed9ac433592794300e7b2546f8.tar.gz |
Fix missing plugins.qmltypes in static builds
plugins.qmltypes should never be built into resources, but always
deployed on the file system so Qt Creator can read it.
Task-number: QTBUG-52297
Task-number: QTBUG-52299
Task-number: QTBUG-52940
Change-Id: Ieadb82bcb71dd4fb769fa0b7d15ec74e12ce7b42
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/qml_module.prf | 20 | ||||
-rw-r--r-- | mkspecs/features/qml_plugin.prf | 2 |
2 files changed, 14 insertions, 8 deletions
diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index 6b08ea3a1a..4db0040dc5 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -14,10 +14,13 @@ equals(TEMPLATE, app): TEMPLATE = aux isEmpty(TARGETPATH): error("Must set TARGETPATH (QML import name)") qmldir_file = $$_PRO_FILE_PWD_/qmldir -fq_qml_files = $$qmldir_file +fq_qml_files = for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_) +fq_aux_qml_files = +for(qmlf, AUX_QML_FILES): fq_aux_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_) + load(qt_build_paths) qml1_target { @@ -32,8 +35,9 @@ qml1_target { builtin_resources { URITARGET = $$replace(URI, "\\.", "_") - # Ensure the qml files are included in the resources - $${URITARGET}.files = $$fq_qml_files + # Ensure the QML files are included in the resources. In static builds, + # the QML engine reads also the qmldir file from the resources. + $${URITARGET}.files = $$qmldir_file $$fq_qml_files # qt-project.org/imports is the path used for locating imports inside the resources $${URITARGET}.prefix = /qt-project.org/imports/$$TARGETPATH RESOURCES += $${URITARGET} @@ -41,8 +45,9 @@ builtin_resources { # Install rules qmldir.base = $$_PRO_FILE_PWD_ -!builtin_resources: qmldir.files = $$fq_qml_files -else: qmldir.files = $$qmldir_file +# 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 qmldir.path = $$instbase/$$TARGETPATH INSTALLS += qmldir @@ -50,8 +55,9 @@ INSTALLS += qmldir !prefix_build { COPIES += qmldir } else { - # For non-installed static builds, qmlimportscanner needs qmldir file in build dir - qmldir2build.files = $$qmldir_file + # For non-installed static builds, tools need qmldir and plugins.qmltypes + # files in the build dir + qmldir2build.files = $$qmldir_file $$fq_aux_qml_files qmldir2build.path = $$DESTDIR COPIES += qmldir2build } diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index f2961f8743..271ca8c460 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -40,7 +40,7 @@ URI = $$replace(TARGETPATH, "/", ".") QMAKE_MOC_OPTIONS += -Muri=$$URI QMLTYPEFILE = $$_PRO_FILE_PWD_/plugins.qmltypes -exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE +exists($$QMLTYPEFILE): AUX_QML_FILES += $$QMLTYPEFILE # Install rules |