CMake: Generate wayland protocol code for examples as well

Task-number: QTBUG-78177
Change-Id: Id1c49013244e5ba51b99c1538b314181efe786fb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2019-09-27 15:10:50 +02:00 committed by Johan Helsing
parent e81441421b
commit 447c868a5d

View File

@ -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=")"
)