diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-10-23 12:40:05 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-24 20:20:59 +0200 |
commit | 48b107ecfe216b93361ee162999e0cd0ee1cee41 (patch) | |
tree | 78fcc7d6b2d70a5b4d1013c0a88503bc64798e79 /mkspecs | |
parent | 16f4bc5b63c3944846ca17314adeea1bdfed566c (diff) |
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>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/create_cmake.prf | 18 | ||||
-rw-r--r-- | mkspecs/features/qt_module_pris.prf | 3 |
2 files changed, 11 insertions, 10 deletions
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 2f61df761a..19b26460a0 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -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) diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index 2e57f498e3..900ade9b6e 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -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 \ |