From 388c4ef9f78c8e6ae134c279aa2afae67c75be9c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 25 Apr 2018 09:35:22 +0200 Subject: Fix build of static plugins with resources with debug-and-release Writing out the $TARGET_plugin_resources.cpp file in !build_pass breaks when TARGET is adjusted by $qtPlatformTargetSuffix values. We end up writing out $TARGET_plugin_resources.cpp but the debug Makefile looks for $TARGET_debug_plugin_resources.cpp. Try using the pro file name as name source instead, as suggested by Ossi. Task-number: QTBUG-67931 Change-Id: I221cf9b2ec1db699568d0c73513aa66ecf0ada97 Reviewed-by: Oswald Buddenhagen --- 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 7ae78d021e..9fed6387c8 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -73,10 +73,12 @@ for(resource, RESOURCES) { } !isEmpty(RESOURCES):contains(TEMPLATE, .*lib):plugin:static { - resource_init_function = $$lower($$basename(TARGET))_plugin_resource_init + pluginName = $$lower($$replace(_PRO_FILE_, .*/([^/.]+)\\.[^/.]+, \\1)) + + 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