summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/pluginWithQmlFile.pro
blob: 8779c5d2eb0aaaaf5589ca44a6ab41b68786c320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
TEMPLATE = lib
CONFIG += plugin
SOURCES = plugin.cpp
QT = core declarative
DESTDIR = ../imports/org/qtproject/AutoTestPluginWithQmlFile

include(../qmldir_copier.pri)

# Copy the necessary QML files to the build tree
QML_IN_FILE = $${_PRO_FILE_PWD_}/MyQmlFile.qml
QML_OUT_FILE = $$OUT_PWD/$$DESTDIR/MyQmlFile.qml

QML_OUT_DIR = $$OUT_PWD/$$DESTDIR
QML_OUT_DIR ~= s,/,$$QMAKE_DIR_SEP,

copyMyQmlFile.input = QML_IN_FILE
copyMyQmlFile.output = $$QML_OUT_FILE
!contains(TEMPLATE_PREFIX, vc):copyMyQmlFile.variable_out = PRE_TARGETDEPS
win32 {
    copyMyQmlFile.commands = ($$QMAKE_CHK_DIR_EXISTS $$QML_OUT_DIR $(MKDIR) $$QML_OUT_DIR) && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
} else {
    copyMyQmlFile.commands = $(MKDIR) $$QML_OUT_DIR && $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
}
copyMyQmlFile.name = COPY ${QMAKE_FILE_IN}
copyMyQmlFile.CONFIG += no_link
# `clean' should leave the build in a runnable state, which means it shouldn't delete
copyMyQmlFile.CONFIG += no_clean
QMAKE_EXTRA_COMPILERS += copyMyQmlFile

DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0