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)")
|
|
|
|
|
2019-03-01 14:37:08 +00:00
|
|
|
!isEmpty(DYNAMIC_QMLDIR) {
|
|
|
|
qmldir_path = $$OUT_PWD
|
|
|
|
write_file($${qmldir_path}/qmldir, DYNAMIC_QMLDIR)|error("Aborting.")
|
|
|
|
} else {
|
|
|
|
qmldir_path = $$_PRO_FILE_PWD_
|
|
|
|
}
|
|
|
|
|
|
|
|
qmldir_file = $${qmldir_path}/qmldir
|
2012-08-06 18:39:49 +00:00
|
|
|
|
2016-08-10 20:58:43 +00:00
|
|
|
fq_qml_files =
|
2012-08-06 18:39:49 +00:00
|
|
|
for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_)
|
|
|
|
|
2016-08-10 20:58:43 +00:00
|
|
|
fq_aux_qml_files =
|
|
|
|
for(qmlf, AUX_QML_FILES): fq_aux_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_)
|
|
|
|
|
2016-06-08 14:48:28 +00:00
|
|
|
load(qt_build_paths)
|
|
|
|
|
2018-10-04 08:08:26 +00:00
|
|
|
DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
|
2012-10-26 13:26:34 +00:00
|
|
|
|
2018-10-04 08:08:26 +00:00
|
|
|
static: \
|
2018-03-13 07:14:07 +00:00
|
|
|
CONFIG += builtin_resources
|
|
|
|
else: \
|
|
|
|
CONFIG += install_qml_files
|
2015-06-19 23:14:07 +00:00
|
|
|
|
|
|
|
builtin_resources {
|
|
|
|
URITARGET = $$replace(URI, "\\.", "_")
|
2018-03-16 09:22:19 +00:00
|
|
|
# In static builds, the QML engine reads also the qmldir file from the resources.
|
|
|
|
static: $${URITARGET}.files = $$qmldir_file
|
|
|
|
# Ensure the QML files are included in the resources.
|
|
|
|
$${URITARGET}.files += $$fq_qml_files
|
2015-06-19 23:14:07 +00:00
|
|
|
# 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
|
2019-03-01 14:37:08 +00:00
|
|
|
qmldir.base = $$qmldir_path
|
|
|
|
qmldir.files = $$qmldir_file
|
2018-10-04 08:08:26 +00:00
|
|
|
qmldir.path = $$[QT_INSTALL_QML]/$$TARGETPATH
|
2012-08-06 18:39:49 +00:00
|
|
|
INSTALLS += qmldir
|
2016-04-22 13:31:27 +00:00
|
|
|
|
2019-03-01 14:37:08 +00:00
|
|
|
qmlfiles.base = $$_PRO_FILE_PWD_
|
|
|
|
qmlfiles.files = $$fq_aux_qml_files
|
|
|
|
install_qml_files: qmlfiles.files += $$fq_qml_files
|
|
|
|
qmlfiles.path = $${qmldir.path}
|
|
|
|
INSTALLS += qmlfiles
|
|
|
|
|
2016-08-15 12:42:27 +00:00
|
|
|
!debug_and_release|!build_all|CONFIG(release, debug|release) {
|
|
|
|
!prefix_build {
|
2019-05-14 10:22:26 +00:00
|
|
|
COPIES += qmldir qmlfiles
|
2016-08-15 12:42:27 +00:00
|
|
|
} else {
|
2016-08-10 20:58:43 +00:00
|
|
|
# For non-installed static builds, tools need qmldir and plugins.qmltypes
|
|
|
|
# files in the build dir
|
2019-05-14 10:22:26 +00:00
|
|
|
qml2build.files = $$qmldir_file $$fq_aux_qml_files
|
|
|
|
qml2build.path = $$DESTDIR
|
|
|
|
COPIES += qml2build
|
2016-08-15 12:42:27 +00:00
|
|
|
}
|
2016-06-08 14:48:28 +00:00
|
|
|
}
|