diff options
author | Andy Shaw <andy.shaw@qt.io> | 2019-03-18 09:51:35 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2019-03-19 13:35:15 +0000 |
commit | d2dff76a4fc2c28bf204db183230ffa1b86cbf43 (patch) | |
tree | 2bd79122f0783910ad932eccb48775e70c7d521f /mkspecs | |
parent | 01e1df90a7debd333314720fdd5cf6cd9964d796 (diff) | |
download | qtbase-d2dff76a4fc2c28bf204db183230ffa1b86cbf43.tar.gz |
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 <joerg.bornemann@qt.io>
Diffstat (limited to 'mkspecs')
-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 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 |