copy qml files to build dir only when doing a non-prefix build

non-installed -prefix builds can't do anything useful with qml plugin
files anyway, so don't waste time on copying them.

Change-Id: I23f4b8f67402a85d3c6e741a04f88567655c1655
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
Oswald Buddenhagen 2012-08-06 16:53:44 +02:00 committed by Qt by Nokia
parent 70aeeda608
commit af3362f065

View File

@ -21,16 +21,18 @@ for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_)
# Only for Qt Creator's project view
OTHER_FILES += $$fq_qml_files
# These bizarre rules copy the files to the build directory
exists($$[QT_HOST_PREFIX]/.qmake.cache) {
# These bizarre rules copy the files to the build directory
qmlfiles2build.input = fq_qml_files
qmlfiles2build.output = $$DESTDIR/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
!contains(TEMPLATE, vc.*): qmlfiles2build.variable_out = PRE_TARGETDEPS
qmlfiles2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
qmlfiles2build.name = COPY ${QMAKE_FILE_IN}
qmlfiles2build.CONFIG = no_link no_clean
qmlfiles2build.input = fq_qml_files
qmlfiles2build.output = $$DESTDIR/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
!contains(TEMPLATE, vc.*): qmlfiles2build.variable_out = PRE_TARGETDEPS
qmlfiles2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
qmlfiles2build.name = COPY ${QMAKE_FILE_IN}
qmlfiles2build.CONFIG = no_link no_clean
QMAKE_EXTRA_COMPILERS += qmlfiles2build
QMAKE_EXTRA_COMPILERS += qmlfiles2build
}
# Install rules