From f9db9a22e9f0d35d8ecaf60b744e663efdd9ea3f Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Wed, 7 Aug 2019 14:25:50 +0200 Subject: [PATCH] Handle qmake's CONFIG=plugin In some tests in qtdeclarative we have projects that are built as a lib with CONFIG=plugin. Without these changes they would be translated to an add_qt_module call. Change-Id: I208d31d43b087ed0b87eb4715f6c49b218fcc2c5 Reviewed-by: Alexandru Croitor --- util/cmake/pro2cmake.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index c8a6ba7f883..f700ef8dff7 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -2093,21 +2093,21 @@ def handle_app_or_lib(scope: Scope, cm_fh: typing.IO[str], *, indent: int = 0, is_example: bool=False) -> None: assert scope.TEMPLATE in ('app', 'lib') + config = scope.get('CONFIG') is_lib = scope.TEMPLATE == 'lib' is_qml_plugin = any('qml_plugin' == s for s in scope.get('_LOADED')) - is_plugin = any('qt_plugin' == s for s in scope.get('_LOADED')) or is_qml_plugin + is_plugin = any('qt_plugin' == s for s in scope.get('_LOADED')) or is_qml_plugin or 'plugin' in config - if is_lib or 'qt_module' in scope.get('_LOADED'): - assert not is_example - write_module(cm_fh, scope, indent=indent) - elif is_plugin: + if is_plugin: assert not is_example write_plugin(cm_fh, scope, indent=indent) + elif is_lib or 'qt_module' in scope.get('_LOADED'): + assert not is_example + write_module(cm_fh, scope, indent=indent) elif 'qt_tool' in scope.get('_LOADED'): assert not is_example write_tool(cm_fh, scope, indent=indent) else: - config = scope.get('CONFIG') gui = all(val not in config for val in ['console', 'cmdline']) if 'testcase' in config \ or 'testlib' in config \