diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-04-25 09:35:22 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-04-25 13:39:32 +0000 |
commit | 388c4ef9f78c8e6ae134c279aa2afae67c75be9c (patch) | |
tree | f9376d89df9bd7c55f860b0f2fdf18833cb4b3d4 /mkspecs/features | |
parent | bd1fd197caab262a0782742daa01eaa36a108ada (diff) |
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 <oswald.buddenhagen@qt.io>
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/resources.prf | 6 |
1 files changed, 4 insertions, 2 deletions
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 |