From 846adfe079fd57410fbb8e9c96eae010cf81dd26 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 17 May 2019 17:24:15 +0200 Subject: [PATCH] Handle the new cmdline config feature in pro2cmake cmdline implies console, so use that also to determine if a binary should get a GUI flag. Change-Id: I084e0a45785df96a7dc2c101af5305fbb39efbc3 Reviewed-by: Tobias Hunger --- util/cmake/pro2cmake.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 5c5569ae30..ba77e0e51f 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -1624,7 +1624,8 @@ def handle_app_or_lib(scope: Scope, cm_fh: typing.IO[str], *, assert not is_example write_test(cm_fh, scope, indent=indent) else: - gui = 'console' not in scope.get('CONFIG') + config = scope.get('CONFIG') + gui = all(val not in config for val in ['console', 'cmdline']) if is_example: write_example(cm_fh, scope, gui, indent=indent) else: