summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-10-01 14:40:00 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-10-08 16:01:27 +0000
commit1aaa53b6dbbc01c27742bd032d500123bcb11a48 (patch)
treec5a690a41f9fcb6fd06ea805d484c3a1db99c1b4 /util
parent37c330fe0717a6b031f82815ac33fb1f0abdc08b (diff)
pro2cmake: Handle REPC_{SOURCE|REPLICA|MERGED}
Change-Id: I7c058bdc5a93038e7b67a727125c315062560d8f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-xutil/cmake/pro2cmake.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 5ac824f63c..3579e8d35e 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -2308,6 +2308,17 @@ def write_qlalrsources(cm_fh: IO[str], target: str, scope: Scope, indent: int =
cm_fh.write(f"{spaces(indent)}\"\"\n")
cm_fh.write(")\n")
+def write_repc_files(cm_fh: IO[str], target: str, scope: Scope, indent: int = 0):
+ for t in ["SOURCE", "REPLICA", "MERGED"]:
+ sources = scope.get_files("REPC_" + t, use_vpath=True)
+ if not sources:
+ continue
+ cm_fh.write(f"qt6_add_repc_{t.lower()}({target}\n")
+ indent += 1
+ for f in sources:
+ cm_fh.write(f"{spaces(indent)}{f}\n")
+ cm_fh.write(")\n")
+
def expand_project_requirements(scope: Scope, skip_message: bool = False) -> str:
requirements = ""
for requirement in scope.get("_REQUIREMENTS"):
@@ -2703,6 +2714,8 @@ def write_main_part(
write_qlalrsources(cm_fh, name, scope, indent)
+ write_repc_files(cm_fh, name, scope, indent)
+
write_simd_part(cm_fh, name, scope, indent)
write_android_part(cm_fh, name, scopes[0], indent)
@@ -3007,6 +3020,7 @@ def write_example(
write_resources(cm_fh, binary_name, scope, indent=indent, is_example=True)
write_statecharts(cm_fh, binary_name, scope, indent=indent, is_example=True)
+ write_repc_files(cm_fh, binary_name, scope, indent=indent)
if qmldir:
write_qml_plugin_epilogue(cm_fh, binary_name, scope, qmldir, indent)