summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2014-02-24 12:24:00 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-25 13:04:07 +0100
commit8b16dc4c2b39dd98ad0975662c8254b8a57477b5 (patch)
tree9486ed8e65b4c20c82236f1c1a1b8ee44f9a19e6
parent67320aa467e66d8018dcfdf4335f97352a38a181 (diff)
downloadqtlocation-8b16dc4c2b39dd98ad0975662c8254b8a57477b5.tar.gz
Copy qmldir of test import to destination directory.
Test imports, used only during tests, are not installed prior to running tests. Copy the qmldir file to the output directory so that the tests can successfully load the import. Task-number: QTBUG-31797 Change-Id: I85095eb7532df6b1fc06f10e46ed8b4db41554a6 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r--tests/plugins/declarativetestplugin/declarativetestplugin.pro6
-rw-r--r--tests/plugins/imports.pri8
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/plugins/declarativetestplugin/declarativetestplugin.pro b/tests/plugins/declarativetestplugin/declarativetestplugin.pro
index ce4fa738..c4c82e2e 100644
--- a/tests/plugins/declarativetestplugin/declarativetestplugin.pro
+++ b/tests/plugins/declarativetestplugin/declarativetestplugin.pro
@@ -15,5 +15,11 @@ SOURCES += locationtest.cpp \
qdeclarativepinchgenerator.cpp \
qdeclarativelocationtestmodel.cpp
+IMPORT_FILES = \
+ qmldir
+
load(qml_plugin)
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+
+# must be after load(qml_plugin)
+include(../imports.pri)
diff --git a/tests/plugins/imports.pri b/tests/plugins/imports.pri
new file mode 100644
index 00000000..e7ff1d42
--- /dev/null
+++ b/tests/plugins/imports.pri
@@ -0,0 +1,8 @@
+!contains(DESTDIR, $$[QT_INSTALL_QML]/$$TARGETPATH) {
+ copyimportfiles.input = IMPORT_FILES
+ copyimportfiles.output = $$DESTDIR/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
+ copyimportfiles.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+ copyimportfiles.CONFIG += no_link_no_clean
+ copyimportfiles.variable_out = PRE_TARGETDEPS
+ QMAKE_EXTRA_COMPILERS += copyimportfiles
+}