diff options
author | Volker Krause <vkrause@kde.org> | 2022-10-11 18:12:40 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-10-18 15:53:18 +0000 |
commit | c7f9ff46f8ad6de6f06d0033d0348fc1c44ab74a (patch) | |
tree | 7b950cad87ee67d8ffd1375261f9beda70663e7f | |
parent | 0011f550452dfabe49a23835b58693b44783f7f1 (diff) | |
download | qtwayland-c7f9ff46f8ad6de6f06d0033d0348fc1c44ab74a.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.
Change-Id: I06dea12dea1058fb6bd99522aa4278c36d271d4e
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 01aa1fc3bf7c5dc48151c9199cc58b78cfe039c3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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 1f2dd272..71d988f4 100644 --- a/src/client/Qt6WaylandClientMacros.cmake +++ b/src/client/Qt6WaylandClientMacros.cmake @@ -1,5 +1,5 @@ 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() @@ -28,15 +28,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 "") |