qt_generate_wayland_protocol_client_sources

Waylandプロトコル.XMLファイルのクライアントサイドC++バインディングを生成します。

このコマンドはQt6 パッケージのWaylandClient コンポーネントで定義されています:

find_package(Qt6 REQUIRED COMPONENTS WaylandClient)

このコマンドはQt 6.0で導入されました。

概要

qt_generate_wayland_protocol_client_sources(target
                                            [PUBLIC_CODE | PRIVATE_CODE]
                                            FILES file1.xml [file2.xml ...])

バージョンレスコマンドが無効になっている場合は、qt6_generate_wayland_protocol_client_sources() 。このコマンドと同じ引数セットをサポートしています。

説明

qt_generate_wayland_protocol_client_sources() は1つ以上のWaylandプロトコルファイルに対してwayland-scannerqtwaylandscanner を実行するためのビルド手順を作成します。このツールはプロトコルを実装するためのバインディングコードをCおよびC++で生成し、生成されたファイルはtarget の一部としてビルドされます。

PUBLIC_CODEPRIVATE_CODE オプション(Qt 6.8で追加)はwayland-scannerpublic-codeprivate-code オプションに対応します。PUBLIC_CODEwayland-scanner で生成されたコードのシンボルをエクスポートします。後方互換性のためにPUBLIC_CODE がデフォルトですが、一般的にはPRIVATE_CODE を強く推奨します。

qt_generate_wayland_protocol_client_sources() は、プロトコルのクライアント側を実装するために必要なファイルを生成します。qt_generate_wayland_protocol_server_sources()は、コンポジター用の同等の関数です。

これらの関数の使い方はカスタムシェルや カスタム拡張の例を参照してください。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.