qt_generate_wayland_protocol_client_sources

Generates client-side C++ bindings for a Wayland protocol .XML file

该命令在 Qt 6.0 引入。

命令的定义在 WaylandClient 组件对于 Qt6 包,可以像这样加载:

find_package(Qt6 REQUIRED COMPONENTS WaylandClient)
					

概要

qt_generate_wayland_protocol_client_sources(target
                                            FILES file1.xml [file2.xml ...])
					

无版本命令 被禁用,使用 qt6_generate_wayland_protocol_client_sources() 代替。它支持如此命令的一组相同自变量。

描述

qt_generate_wayland_protocol_client_sources() creates the build steps to run waylandscanner and 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 target .

qt_generate_wayland_protocol_client_sources() will trigger generation of the files needed to implement the client side of the protocol. qt_generate_wayland_protocol_server_sources() is the equivalent function for the compositor.

自定义 Shell or Custom Extension examples for a demonstration of how to use these functions.