diff options
Diffstat (limited to 'src/controls/controls.pro')
-rw-r--r-- | src/controls/controls.pro | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/controls/controls.pro b/src/controls/controls.pro index 78eadf36..38018353 100644 --- a/src/controls/controls.pro +++ b/src/controls/controls.pro @@ -45,5 +45,32 @@ include(Styles/styles.pri) osx: LIBS += -framework Carbon +# Create the resource file +GENERATED_RESOURCE_FILE = $$OUT_PWD/controls.qrc + +INCLUDED_RESOURCE_FILES = \ + $$CONTROLS_QML_FILES \ + $$PRIVATE_QML_FILES \ + $$STYLES_QML_FILES + +RESOURCE_CONTENT = \ + "<RCC>" \ + "<qresource prefix=\"/QtQuick/Controls\">" + +for(resourcefile, INCLUDED_RESOURCE_FILES) { + resourcefileabsolutepath = $$absolute_path($$resourcefile) + relativepath_in = $$relative_path($$resourcefileabsolutepath, $$_PRO_FILE_PWD_) + relativepath_out = $$relative_path($$resourcefileabsolutepath, $$OUT_PWD) + RESOURCE_CONTENT += "<file alias=\"$$relativepath_in\">$$relativepath_out</file>" +} + +RESOURCE_CONTENT += \ + "</qresource>" \ + "</RCC>" + +write_file($$GENERATED_RESOURCE_FILE, RESOURCE_CONTENT)|error("Aborting.") + +RESOURCES += $$GENERATED_RESOURCE_FILE + CONFIG += no_cxx_module load(qml_plugin) |