qt5base-lts/mkspecs/features/qml_module.prf
Oswald Buddenhagen 842b1bd29e factor qml_module out of qml_plugin
this makes it comfortable to create qml-only modules

Change-Id: I17a5a3ee24210b93db05e50502c6ca91a4e7a9d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-07 23:27:17 +02:00

29 lines
961 B
Plaintext

equals(TEMPLATE, app): TEMPLATE = aux
isEmpty(TARGETPATH): error("Must set TARGETPATH (QML import name)")
fq_qml_files = $$_PRO_FILE_PWD_/qmldir
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
exists($$[QT_HOST_PREFIX]/.qmake.cache) {
# These bizarre rules copy the files to the qtbase build directory
qmlfiles2build.input = fq_qml_files
qmlfiles2build.output = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH/${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
}
# Install rules
qmldir.files = $$fq_qml_files
qmldir.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
INSTALLS += qmldir