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>
This commit is contained in:
parent
bd1fd197ca
commit
388c4ef9f7
@ -73,10 +73,12 @@ for(resource, RESOURCES) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
!isEmpty(RESOURCES):contains(TEMPLATE, .*lib):plugin:static {
|
!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"
|
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
|
GENERATED_SOURCES += $$RESOURCE_INIT_CPP
|
||||||
QMAKE_DISTCLEAN += $$RESOURCE_INIT_CPP
|
QMAKE_DISTCLEAN += $$RESOURCE_INIT_CPP
|
||||||
|
Loading…
Reference in New Issue
Block a user