summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-09-27 15:10:50 +0200
committerJohan Helsing <johan.helsing@qt.io>2019-10-01 13:49:18 +0000
commit447c868a5df9aac84ae39989d09bc2b704940698 (patch)
tree8cebbc0672abf08f84932ff3503b63fe39c9a1a3
parente81441421b67556ec84be0c391df7baaa51cf504 (diff)
CMake: Generate wayland protocol code for examples as well
Task-number: QTBUG-78177 Change-Id: Id1c49013244e5ba51b99c1538b314181efe786fb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rwxr-xr-xutil/cmake/pro2cmake.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index b842e9fcc3..a2ea6ce0bf 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -2578,7 +2578,10 @@ def write_wayland_part(cm_fh: typing.IO[str], target: str, scope:Scope, indent:
if len(client_sources) == 0 and len(server_sources) == 0:
return
- condition = map_to_cmake_condition(scope.total_condition)
+ condition = "ON"
+ if scope.total_condition:
+ condition = map_to_cmake_condition(scope.total_condition)
+
if condition != "ON":
cm_fh.write(f"\n{spaces(indent)}if({condition})\n")
indent += 1
@@ -2946,6 +2949,8 @@ def write_example(
cm_fh.write(")\n")
+ write_wayland_part(cm_fh, binary_name, scope, indent=0)
+
write_include_paths(
cm_fh, scope, f"target_include_directories({binary_name} PUBLIC", indent=0, footer=")"
)