From 751f08cf46f505980b8ebe9a228a6c229b470152 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 7 Mar 2017 12:00:08 +0100 Subject: Enable the use of QML caching at build time Task-number: QTBUG-58571 Change-Id: I11c9dfb4e0fad93b2961db4213f934eca7d214df Reviewed-by: Mitch Curtis Reviewed-by: J-P Nurmi --- src/controls/controls.pro | 10 +++++++--- src/dialogs/dialogs.pro | 8 ++++++-- src/extras/extras.pro | 2 ++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/controls/controls.pro b/src/controls/controls.pro index 63d055d6..5f40c0a3 100644 --- a/src/controls/controls.pro +++ b/src/controls/controls.pro @@ -40,8 +40,12 @@ CONTROLS_QML_FILES = \ ToolBar.qml \ ToolButton.qml -!qtquickcompiler: QML_FILES += $$CONTROLS_QML_FILES -qtquickcompiler: DEFINES += ALWAYS_LOAD_FROM_RESOURCES +qtquickcompiler { + DEFINES += ALWAYS_LOAD_FROM_RESOURCES +} else { + QML_FILES += $$CONTROLS_QML_FILES + !static: CONFIG += qmlcache +} SOURCES += $$PWD/plugin.cpp HEADERS += $$PWD/plugin.h @@ -55,7 +59,7 @@ include(Shaders/shaders.pri) osx: LIBS_PRIVATE += -framework Carbon -!static { +!qmlcache { # Create the resource file GENERATED_RESOURCE_FILE = $$OUT_PWD/controls.qrc diff --git a/src/dialogs/dialogs.pro b/src/dialogs/dialogs.pro index f19283f2..e5cc7d79 100644 --- a/src/dialogs/dialogs.pro +++ b/src/dialogs/dialogs.pro @@ -7,7 +7,11 @@ IMPORT_VERSION = 1.2 QMAKE_DOCS = $$PWD/doc/qtquickdialogs.qdocconf -qtquickcompiler: DEFINES += ALWAYS_LOAD_FROM_RESOURCES +qtquickcompiler { + DEFINES += ALWAYS_LOAD_FROM_RESOURCES +} else { + !static: CONFIG += qmlcache +} SOURCES += \ qquickabstractmessagedialog.cpp \ @@ -80,7 +84,7 @@ ios|android|blackberry|winrt { QT += quick-private gui gui-private core core-private qml qml-private -!static { +!qmlcache { # Create the resource file GENERATED_RESOURCE_FILE = $$OUT_PWD/dialogs.qrc diff --git a/src/extras/extras.pro b/src/extras/extras.pro index 3604044d..d357f445 100644 --- a/src/extras/extras.pro +++ b/src/extras/extras.pro @@ -28,6 +28,8 @@ SOURCES += plugin.cpp \ include(Private/private.pri) include(designer/designer.pri) +!static: CONFIG += qmlcache + OTHER_FILES += doc/src/* TR_EXCLUDE += designer/* -- cgit v1.2.1