summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/resources.prf
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/resources.prf')
-rw-r--r--mkspecs/features/resources.prf11
1 files changed, 6 insertions, 5 deletions
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index a25846bd77..fa8ff1fb58 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -28,6 +28,7 @@ for(resource, RESOURCES) {
!exists($$absolute_path($$resource, $$_PRO_FILE_PWD_)): \
warning("Failure to find: $$resource")
qmake_immediate.files += $$resource
+ OTHER_FILES *= $$resource
}
RESOURCES -= $$resource
next()
@@ -57,6 +58,7 @@ for(resource, RESOURCES) {
alias = $$relative_path($$file, $$abs_base)
resource_file_content += \
"<file alias=\"$$xml_escape($$alias)\">$$xml_escape($$file)</file>"
+ OTHER_FILES *= $$file
}
}
@@ -73,17 +75,16 @@ for(resource, RESOURCES) {
}
!isEmpty(RESOURCES):contains(TEMPLATE, .*lib):plugin:static {
- pluginName = $$lower($$replace(_PRO_FILE_, .*/([^/.]+)\\.[^/.]+, \\1))
-
+ pluginBaseName = $$basename(TARGET)
+ pluginName = $$lower($$replace(pluginBaseName, [-], _))
resource_init_function = $${pluginName}_plugin_resource_init
DEFINES += "QT_PLUGIN_RESOURCE_INIT_FUNCTION=$$resource_init_function"
-
RESOURCE_INIT_CPP = $$OUT_PWD/$${pluginName}_plugin_resources.cpp
GENERATED_SOURCES += $$RESOURCE_INIT_CPP
QMAKE_DISTCLEAN += $$RESOURCE_INIT_CPP
- !build_pass {
+ isEmpty(BUILDS)|build_pass {
RESOURCE_INIT_CONT = \
"// This file is autogenerated by qmake. It contains a function that" \
"// references all resources the plugin includes and the function is" \
@@ -111,7 +112,7 @@ rcc.name = RCC ${QMAKE_FILE_IN}
rcc.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
rcc.CONFIG += add_inputs_as_makefile_deps dep_lines
-!resources_big|ltcg|macx-xcode|contains(TEMPLATE, "vc.*") {
+!resources_big|ltcg|macx-xcode|wasm|contains(TEMPLATE, "vc.*") {
rcc.output = $$RCC_DIR/$${first(QMAKE_MOD_RCC)}_${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
rcc.commands = $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}