summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-09-20 16:24:57 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-09-20 14:43:45 +0000
commitf771b8f6b14418508c110e1e0dcd31b903424fca (patch)
tree93b3b216c40a3c41200c431632336214266eb756 /util
parent9fe82283c65f46b5d5a48b82c94eb7d405b35eee (diff)
cmake: Let pro2cmake use private statechart API for non-examples
Change-Id: If6206f2377e90ba7f8502029a1cc74856a2e03a1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-xutil/cmake/pro2cmake.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index cb728f1e8f..73171bbcfe 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")