From f771b8f6b14418508c110e1e0dcd31b903424fca Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 20 Sep 2019 16:24:57 +0200 Subject: [PATCH] cmake: Let pro2cmake use private statechart API for non-examples Change-Id: If6206f2377e90ba7f8502029a1cc74856a2e03a1 Reviewed-by: Alexandru Croitor --- util/cmake/pro2cmake.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index cb728f1e8fd..73171bbcfe7 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -2282,12 +2282,15 @@ def write_resources(cm_fh: IO[str], target: str, scope: Scope, indent: int = 0, for line in qrc_output.split("\n"): cm_fh.write(f"{' ' * indent}{line}\n") -def write_statecharts(cm_fh: IO[str], target: str, scope: Scope, indent: int = 0): +def write_statecharts(cm_fh: IO[str], target: str, scope: Scope, indent: int = 0, is_example=False): sources = scope.get("STATECHARTS") if not sources: return cm_fh.write("\n# Statecharts:\n") - cm_fh.write(f"qt6_add_statecharts({target}\n") + if is_example: + cm_fh.write(f"qt6_add_statecharts({target}\n") + else: + cm_fh.write(f"add_qt_statecharts({target} FILES\n") indent += 1 for f in sources: cm_fh.write(f"{spaces(indent)}{f}\n")