summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-08-07 14:25:50 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-08-07 12:34:59 +0000
commitf9db9a22e9f0d35d8ecaf60b744e663efdd9ea3f (patch)
tree66573b596fae277c0f4b5a5ca204c8ffc65ceb30
parente76c83a879f4a2efa40ee5e65acebefc8f9b4cb1 (diff)
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 <alexandru.croitor@qt.io>
-rwxr-xr-xutil/cmake/pro2cmake.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index c8a6ba7f88..f700ef8dff 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 \