make better use of $$MODULE_PLUGIN_TYPES

the module project files declare what plugins they need, as that is
necessary for automatic android deployment.
enable wider usage of this by making the information available from the
module .pri files.
caveat: the variable is called "types", but is in fact paths, so there
can be particular plugins named.

use this new facility to replace the egregious hard-coded list of
plugin-to-module mappings from create_cmake.

possible todo: automate populating DEPLOYMENT (for wince, and whatever
else).

Change-Id: Ibb9c07cfe2b0008905204cbeb81e9c8e2ae4dc69
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-10-23 12:40:05 +02:00 committed by The Qt Project
parent 16f4bc5b63
commit 48b107ecfe
2 changed files with 11 additions and 10 deletions

View File

@ -111,15 +111,15 @@ 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) {
equals(PLUGIN_TYPE, bearer): PLUGIN_MODULE_NAME = network
else:equals(PLUGIN_TYPE, sqldrivers): PLUGIN_MODULE_NAME = sql
else:equals(PLUGIN_TYPE, accessible): PLUGIN_MODULE_NAME = widgets
else:equals(PLUGIN_TYPE, imageformats): PLUGIN_MODULE_NAME = gui
else:equals(PLUGIN_TYPE, platforminputcontexts): PLUGIN_MODULE_NAME = gui
else:equals(PLUGIN_TYPE, platformthemes): PLUGIN_MODULE_NAME = gui
else:equals(PLUGIN_TYPE, generic): PLUGIN_MODULE_NAME = gui
else:equals(PLUGIN_TYPE, platforms): PLUGIN_MODULE_NAME = gui
else: return()
PLUGIN_MODULE_NAME =
for (mod, QT_MODULES) {
types = $$replace(QT.$${mod}.plugin_types, /.*$, )
contains(types, $$PLUGIN_TYPE) {
PLUGIN_MODULE_NAME = $$mod
break()
}
}
isEmpty(PLUGIN_MODULE_NAME): return()
CMAKE_MODULE_NAME = $$cmakeModuleName($$PLUGIN_MODULE_NAME)

View File

@ -99,7 +99,8 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
"QT.$${MODULE_ID}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \
"QT.$${MODULE_ID}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
"QT.$${MODULE_ID}.imports = \$\$QT_MODULE_IMPORT_BASE" \
"QT.$${MODULE_ID}.qml = \$\$QT_MODULE_QML_BASE"
"QT.$${MODULE_ID}.qml = \$\$QT_MODULE_QML_BASE" \
$$join(MODULE_PLUGIN_TYPES, " ", "QT.$${MODULE_ID}.plugin_types = ")
MODULE_PRI_CONT += \
"QT.$${MODULE_ID}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
$$module_rundep \