2012-12-11 21:08:15 +00:00
|
|
|
#
|
|
|
|
# W A R N I N G
|
|
|
|
# -------------
|
|
|
|
#
|
|
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
|
|
# implementation detail. It may change from version to version
|
|
|
|
# without notice, or even be removed.
|
|
|
|
#
|
|
|
|
# We mean it.
|
|
|
|
#
|
|
|
|
|
2012-08-06 18:39:49 +00:00
|
|
|
equals(TEMPLATE, app): TEMPLATE = aux
|
|
|
|
|
|
|
|
isEmpty(TARGETPATH): error("Must set TARGETPATH (QML import name)")
|
|
|
|
|
2015-06-19 23:14:07 +00:00
|
|
|
qmldir_file = $$_PRO_FILE_PWD_/qmldir
|
|
|
|
fq_qml_files = $$qmldir_file
|
2012-08-06 18:39:49 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2012-10-26 13:26:34 +00:00
|
|
|
qml1_target: \
|
|
|
|
instbase = $$[QT_INSTALL_IMPORTS]
|
2012-10-15 20:23:13 +00:00
|
|
|
else: \
|
|
|
|
instbase = $$[QT_INSTALL_QML]
|
2012-10-26 13:26:34 +00:00
|
|
|
|
2015-06-19 23:14:07 +00:00
|
|
|
!qml1_target:static: CONFIG += builtin_resources
|
|
|
|
|
2014-09-12 09:18:44 +00:00
|
|
|
!force_independent:if(!debug_and_release|!build_all|CONFIG(release, debug|release)) {
|
2012-08-06 18:39:49 +00:00
|
|
|
# These bizarre rules copy the files to the qtbase build directory
|
|
|
|
|
2012-08-06 20:27:26 +00:00
|
|
|
defineReplace(qmlModStripSrcDir) {
|
|
|
|
return($$relative_path($$1, $$_PRO_FILE_PWD_))
|
|
|
|
}
|
|
|
|
|
2015-06-19 23:14:07 +00:00
|
|
|
!builtin_resources: qmlfiles2build.input = fq_qml_files
|
|
|
|
else: qmlfiles2build.input = qmldir_file
|
2012-10-26 13:26:34 +00:00
|
|
|
qmlfiles2build.output = $$instbase/$$TARGETPATH/${QMAKE_FUNC_FILE_IN_qmlModStripSrcDir}
|
2012-08-06 18:39:49 +00:00
|
|
|
!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
|
|
|
|
}
|
|
|
|
|
2015-06-19 23:14:07 +00:00
|
|
|
builtin_resources {
|
|
|
|
URITARGET = $$replace(URI, "\\.", "_")
|
|
|
|
# Ensure the qml files are included in the resources
|
|
|
|
$${URITARGET}.files = $$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}
|
|
|
|
}
|
|
|
|
|
2012-08-06 18:39:49 +00:00
|
|
|
# Install rules
|
2012-08-06 20:27:26 +00:00
|
|
|
qmldir.base = $$_PRO_FILE_PWD_
|
2015-06-19 23:14:07 +00:00
|
|
|
!builtin_resources: qmldir.files = $$fq_qml_files
|
|
|
|
else: qmldir.files = $$qmldir_file
|
2012-10-26 13:26:34 +00:00
|
|
|
qmldir.path = $$instbase/$$TARGETPATH
|
2012-08-06 18:39:49 +00:00
|
|
|
INSTALLS += qmldir
|