1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\page qt-generate-wayland-protocol-server-sources.html
6\ingroup cmake-commands-qtwaylandcompositor
8\title qt_generate_wayland_protocol_server_sources
9\keyword qt6_generate_wayland_protocol_server_sources
11\summary {Generates server-side C++ bindings for a Wayland protocol .XML file}
15The command is defined in the \c WaylandCompositor component of the \c Qt6 package, which
19find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
25qt_generate_wayland_protocol_server_sources(target
26 FILES file1.xml [file2.xml ...])
29\versionlessCMakeCommandsNote qt6_generate_wayland_protocol_server_sources()
33qt_generate_wayland_protocol_server_sources() creates the build steps to run \c{waylandscanner} and
34\c{qtwaylandscanner} on one or more Wayland protocol files. The tools will in turn generate binding
35code in C and C++ for implementing the protocols, and the resulting files will be built as part
38qt_generate_wayland_protocol_server_sources() will trigger generation of the files needed to
39implement the compositor side of the protocol.
41\l{qt_generate_wayland_protocol_client_sources}{qt_generate_wayland_protocol_client_sources()}
42is the equivalent function for the client.
44See the \l{Custom Shell} or \l{Custom Extension} examples for a demonstration of how to use these