Exclude sources generated by the scanner from CMake Unity (Jumbo) builds

The generated helper function wlRegistryBind() clashes.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ib814d4576c7565b0413ca16bc0bf5e95caa92c33
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Friedemann Kleint 2023-02-08 15:11:07 +01:00
parent e8a052bc8f
commit 43a99beccd

View File

@ -86,12 +86,14 @@ function(qt6_generate_wayland_protocol_client_sources target)
DEPENDS ${protocol_file} Qt6::qtwaylandscanner
)
target_sources(${target} PRIVATE
"${waylandscanner_header_output}"
set(sources "${waylandscanner_header_output}"
"${waylandscanner_code_output}"
"${qtwaylandscanner_header_output}"
"${qtwaylandscanner_code_output}"
)
"${qtwaylandscanner_code_output}")
target_sources(${target} PRIVATE ${sources})
set_source_files_properties(${sources} PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
endforeach()
target_include_directories(${target} PRIVATE ${target_binary_dir})
endfunction()