summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/create_cmake.prf
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-04-02 22:19:01 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-09 20:53:06 +0200
commit08672adb97c0707c513850a27aaec59327874260 (patch)
tree40b0d5621ae4611545a87e2337a19ed2d0438f49 /mkspecs/features/create_cmake.prf
parent06e4676871143acf99380dfe9331563d106d3c50 (diff)
make cmake registration of qt plugins make use of PLUGIN_EXTENDS
instead of assigning plugins to the first module which claims the whole type, try to assign it to a module which the plugin claims to extend. as we are getting stricter in that go, somebody needs to claim the 'generic', 'platformthemes', and 'platforminputcontexts' plugin types. the natural claimant is QtGui. however, as we don't want to auto-link any of these plugins, make them all claim that they extend a non-existing module. QtGui also claims 'iconengines' plugins. the 'printsupport' plugins are also claimed by the respective module. Change-Id: I7af7c16089f137b8d4a4ed93d1577bd85815c87b Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs/features/create_cmake.prf')
-rw-r--r--mkspecs/features/create_cmake.prf21
1 files changed, 14 insertions, 7 deletions
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 82e2812f3b..ac5fe22d75 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -111,15 +111,22 @@ if(build_all|CONFIG(debug, debug|release)): CMAKE_DEBUG_TYPE = debug
if(build_all|CONFIG(release, debug|release)): CMAKE_RELEASE_TYPE = release
contains(CONFIG, plugin) {
- PLUGIN_MODULE_NAME =
- for (mod, QT_MODULES) {
- types = $$replace(QT.$${mod}.plugin_types, /.*$, )
- contains(types, $$PLUGIN_TYPE) {
- PLUGIN_MODULE_NAME = $$mod
- break()
+ !isEmpty(PLUGIN_EXTENDS):!equals(PLUGIN_EXTENDS, -) {
+ count(PLUGIN_EXTENDS, 1, greaterThan): \
+ error("Plugin declares to extend multiple modules. We don't handle that ...")
+ PLUGIN_MODULE_NAME = $$PLUGIN_EXTENDS
+ } else {
+ PLUGIN_MODULE_NAME =
+ for (mod, QT_MODULES) {
+ contains(QT.$${mod}.plugin_types, $$PLUGIN_TYPE) {
+ !isEmpty(PLUGIN_MODULE_NAME): \
+ error("Multiple modules claim plugin type '$$PLUGIN_TYPE' ($$mod, in addition to $$PLUGIN_MODULE_NAME)")
+ PLUGIN_MODULE_NAME = $$mod
+ break()
+ }
}
+ isEmpty(PLUGIN_MODULE_NAME): error("No module claims plugin type '$$PLUGIN_TYPE'")
}
- isEmpty(PLUGIN_MODULE_NAME): return()
CMAKE_MODULE_NAME = $$cmakeModuleName($$PLUGIN_MODULE_NAME)