summaryrefslogtreecommitdiffstats
path: root/src/compositor/doc/src/cmake/qt_generate_wayland_protocol_server_sources.qdoc
blob: 5a58494639d40bc8e5d8fdad889be107a937a772 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
\page qt-generate-wayland-protocol-server-sources.html
\ingroup cmake-commands-qtwaylandcompositor

\title qt_generate_wayland_protocol_server_sources
\keyword qt6_generate_wayland_protocol_server_sources

\summary {Generates server-side C++ bindings for a Wayland protocol .XML file}

\cmakecommandsince 6.0

The command is defined in the \c WaylandCompositor component of the \c Qt6 package, which
can be loaded like so:

\badcode
find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
\endcode

\section1 Synopsis

\badcode
qt_generate_wayland_protocol_server_sources(target
                                            FILES file1.xml [file2.xml ...])
\endcode

\versionlessCMakeCommandsNote qt6_generate_wayland_protocol_server_sources()

\section1 Description

qt_generate_wayland_protocol_server_sources() creates the build steps to run \c{waylandscanner} and
\c{qtwaylandscanner} on one or more Wayland protocol files. The tools will in turn generate binding
code in C and C++ for implementing the protocols, and the resulting files will be built as part
of the \c target.

qt_generate_wayland_protocol_server_sources() will trigger generation of the files needed to
implement the compositor side of the protocol.

\l{qt_generate_wayland_protocol_client_sources}{qt_generate_wayland_protocol_client_sources()}
is the equivalent function for the client.

See the \l{Custom Shell} or \l{Custom Extension} examples for a demonstration of how to use these
functions.
*/