From 20f4f50a3a84cd0405990d83da008cb7aff2ceaa Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Thu, 10 Oct 2019 16:47:17 +0200 Subject: [PATCH] Fix invalid condition in module generation Fix invalid condition which would cause valid qt modules not to be written out as modules. Change-Id: Id4b408f2502a34c011595c4602145b6980ee9d58 Reviewed-by: Alexandru Croitor --- util/cmake/pro2cmake.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 06c11f2d8d4..0b814f432fe 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -2979,12 +2979,12 @@ def handle_app_or_lib( elif is_plugin: assert not is_example target = write_plugin(cm_fh, scope, indent=indent) - elif is_lib and "qt_module" in scope.get("_LOADED"): - assert not is_example - target = write_module(cm_fh, scope, indent=indent) - elif is_lib: + elif is_lib and not "qt_module" in scope.get("_LOADED"): assert not is_example target = write_generic_library(cm_fh, scope, indent=indent) + elif is_lib or "qt_module" in scope.get("_LOADED"): + assert not is_example + target = write_module(cm_fh, scope, indent=indent) elif "qt_tool" in scope.get("_LOADED"): assert not is_example target = write_tool(cm_fh, scope, indent=indent)