diff options
author | Volker Krause <vkrause@kde.org> | 2022-10-11 18:12:40 +0200 |
---|---|---|
committer | Volker Krause <vkrause@kde.org> | 2022-10-18 17:01:59 +0200 |
commit | 01aa1fc3bf7c5dc48151c9199cc58b78cfe039c3 (patch) | |
tree | 9fc1b31f1c15c8c360a46b8d7e334999ac4a3304 /src | |
parent | e7b271315220861a01c001709fecd51ef97ed726 (diff) | |
download | qtwayland-01aa1fc3bf7c5dc48151c9199cc58b78cfe039c3.tar.gz |
Allow to run wayland-scanner without --include-core-only
There are Wayland protocols for which using this option doesn't
result in compilable code. Examples are input-method-unstable-v1
and linux-dmabuf-v1.
Pick-to: 6.4
Change-Id: I06dea12dea1058fb6bd99522aa4278c36d271d4e
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/client/Qt6WaylandClientMacros.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/Qt6WaylandClientMacros.cmake b/src/client/Qt6WaylandClientMacros.cmake index f8cdc67f..ea0ac323 100644 --- a/src/client/Qt6WaylandClientMacros.cmake +++ b/src/client/Qt6WaylandClientMacros.cmake @@ -2,7 +2,7 @@ # SPDX-License-Identifier: BSD-3-Clause function(qt6_generate_wayland_protocol_client_sources target) - cmake_parse_arguments(arg "" "__QT_INTERNAL_WAYLAND_INCLUDE_DIR" "FILES" ${ARGN}) + cmake_parse_arguments(arg "NO_INCLUDE_CORE_ONLY" "__QT_INTERNAL_WAYLAND_INCLUDE_DIR" "FILES" ${ARGN}) if(DEFINED arg_UNPARSED_ARGUMENTS) message(FATAL_ERROR "Unknown arguments were passed to qt6_generate_wayland_protocol_client_sources: (${arg_UNPARSED_ARGUMENTS}).") endif() @@ -31,15 +31,18 @@ function(qt6_generate_wayland_protocol_client_sources target) set(qtwaylandscanner_header_output "${target_binary_dir}/qwayland-${protocol_name}.h") set(qtwaylandscanner_code_output "${target_binary_dir}/qwayland-${protocol_name}.cpp") + if (NOT arg_NO_INCLUDE_CORE_ONLY) + set(waylandscanner_extra_args "--include-core-only") + endif() add_custom_command( OUTPUT "${waylandscanner_header_output}" #TODO: Maybe put the files in ${CMAKE_CURRENT_BINARY_DIR/wayland_generated instead? - COMMAND Wayland::Scanner --strict --include-core-only client-header < "${protocol_file}" > "${waylandscanner_header_output}" + COMMAND Wayland::Scanner --strict ${waylandscanner_extra_args} client-header < "${protocol_file}" > "${waylandscanner_header_output}" ) add_custom_command( OUTPUT "${waylandscanner_code_output}" - COMMAND Wayland::Scanner --strict --include-core-only public-code < "${protocol_file}" > "${waylandscanner_code_output}" + COMMAND Wayland::Scanner --strict ${waylandscanner_extra_args} public-code < "${protocol_file}" > "${waylandscanner_code_output}" ) set(wayland_include_dir "") |