이 페이지에서

qt_generate_wayland_protocol_server_sources

Wayland 프로토콜 .XML 파일에 대한 서버 측 C++ 바인딩을 생성합니다

이 명령어는 Qt6 패키지의 WaylandCompositor 구성 요소에 정의되어 있으며, 다음과 같이 불러올 수 있습니다:

find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)

이 명령어는 Qt 6.0에서 도입되었습니다.

개요

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

버전 정보가 없는 명령어가 비활성화된 경우, 대신 qt6_generate_wayland_protocol_server_sources() 를 사용하십시오. 이 명령어는 본 명령어와 동일한 인자 세트를 지원합니다.

설명

qt_generate_wayland_protocol_server_sources()는 하나 이상의 Wayland 프로토콜 파일에 대해 waylandscanner 및 qtwaylandscanner 를 실행하기 위한 빌드 단계를 생성합니다. 이 도구들은 프로토콜을 구현하기 위한 C 및 C++ 바인딩 코드를 생성하며, 결과 파일은 target 의 일부로 빌드됩니다.

PUBLIC_CODE 및 PRIVATE_CODE 옵션(Qt 6.8에 추가됨)은 wayland-scanner 의 public-code 및 private-code 옵션에 해당합니다.

Qt 6.12 이전에는 기본값이 PUBLIC_CODE 이었습니다. Qt 6.12 및 이후 버전에서는 Qt 정책 qt_cmake_policy_qtp0006이 NEW 로 설정된 경우 기본값이 PRIVATE_CODE 입니다. 일반적으로 PRIVATE_CODE 를 사용하는 것이 강력히 권장됩니다.

qt_generate_wayland_protocol_server_sources()는 프로토콜의 컴포지터 측을 구현하는 데 필요한 파일 생성을 트리거합니다.

qt_generate_wayland_protocol_client_sources() 는 클라이언트 측에 해당하는 함수입니다.

이 함수들의 사용 방법을 확인하려면 Custom Shell 또는 Custom Extension 예제를 참조하십시오.

© 2026 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.