From d2dff76a4fc2c28bf204db183230ffa1b86cbf43 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 18 Mar 2019 09:51:35 +0100 Subject: Replace instances of - with _ when generating the function name As - cannot be used in a function name but can still be used as part of the TARGET, then we need to make sure that it is replaced to avoid a compile problem. Change-Id: I0b2e465310206e2522ce59235b1592517817d3e2 Reviewed-by: Joerg Bornemann --- mkspecs/features/resources.prf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index b4e0db6445..fa8ff1fb58 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -75,9 +75,11 @@ for(resource, RESOURCES) { } !isEmpty(RESOURCES):contains(TEMPLATE, .*lib):plugin:static { - resource_init_function = $$lower($$basename(TARGET))_plugin_resource_init + 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/$$lower($$basename(TARGET))_plugin_resources.cpp + RESOURCE_INIT_CPP = $$OUT_PWD/$${pluginName}_plugin_resources.cpp GENERATED_SOURCES += $$RESOURCE_INIT_CPP QMAKE_DISTCLEAN += $$RESOURCE_INIT_CPP -- cgit v1.2.3