summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-10-01 08:47:00 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-10-08 15:48:39 +0000
commit37c330fe0717a6b031f82815ac33fb1f0abdc08b (patch)
treea33ea1a201173dd38422fec350eb04bdf877564c
parent82c86856d1fefac5badf91d77a4f81a068fd5060 (diff)
pro2cmake: Handle QLALRSOURCES
Change-Id: I8e6b2d542c96947d487b934c27544a8a4ae8745c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rwxr-xr-xutil/cmake/pro2cmake.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 4c3c474811..5ac824f63c 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -2296,6 +2296,17 @@ def write_statecharts(cm_fh: IO[str], target: str, scope: Scope, indent: int = 0
cm_fh.write(f"{spaces(indent)}{f}\n")
cm_fh.write(")\n")
+def write_qlalrsources(cm_fh: IO[str], target: str, scope: Scope, indent: int = 0):
+ sources = scope.get_files("QLALRSOURCES", use_vpath=True)
+ if not sources:
+ return
+ cm_fh.write("\n# QLALR Grammars:\n")
+ cm_fh.write(f"qt_process_qlalr(\n")
+ indent += 1
+ cm_fh.write(f"{spaces(indent)}{';'.join(sources)}\n")
+ cm_fh.write(f"{spaces(indent)}{target}\n")
+ cm_fh.write(f"{spaces(indent)}\"\"\n")
+ cm_fh.write(")\n")
def expand_project_requirements(scope: Scope, skip_message: bool = False) -> str:
requirements = ""
@@ -2690,6 +2701,8 @@ def write_main_part(
write_statecharts(cm_fh, name, scope, indent)
+ write_qlalrsources(cm_fh, name, scope, indent)
+
write_simd_part(cm_fh, name, scope, indent)
write_android_part(cm_fh, name, scopes[0], indent)