CMake: Add checks that the wayland scanner targets are found
There was an issue when cross-compiling Qt tools with Yocto, that the dependency between QtWaylandScannerTools and WaylandScanner was not registered, leading to failures at build time, try to run an executable called "Wayland::Scanner". Explicitly check that the targets exist, and fail at configure time in case they don't exist. Task-number: QTBUG-83968 Change-Id: I19ece78b77619761394d047f15cd3a7a37fb0cbf Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
af89d09f92
commit
42d9e19e40
@ -2,6 +2,14 @@ function(qt6_generate_wayland_protocol_client_sources target)
|
||||
qt_parse_all_arguments(arg "qt6_generate_wayland_protocol_client_sources" "" "" "FILES" ${ARGN})
|
||||
get_target_property(target_binary_dir ${target} BINARY_DIR)
|
||||
|
||||
if(NOT TARGET Wayland::Scanner)
|
||||
message(FATAL_ERROR "Wayland::Scanner target not found. You might be missing the WaylandScanner CMake package.")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Qt6::qtwaylandscanner)
|
||||
message(FATAL_ERROR "qtwaylandscanner executable not found. Most likely there is an issue with your Qt installation.")
|
||||
endif()
|
||||
|
||||
foreach(protocol_file IN LISTS arg_FILES)
|
||||
get_filename_component(protocol_name "${protocol_file}" NAME_WLE)
|
||||
|
||||
|
@ -2,6 +2,14 @@ function(qt6_generate_wayland_protocol_server_sources target)
|
||||
qt_parse_all_arguments(arg "qt6_generate_wayland_protocol_server_sources" "" "" "FILES" ${ARGN})
|
||||
get_target_property(target_binary_dir ${target} BINARY_DIR)
|
||||
|
||||
if(NOT TARGET Wayland::Scanner)
|
||||
message(FATAL_ERROR "Wayland::Scanner target not found. You might be missing the WaylandScanner CMake package.")
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Qt6::qtwaylandscanner)
|
||||
message(FATAL_ERROR "qtwaylandscanner executable not found. Most likely there is an issue with your Qt installation.")
|
||||
endif()
|
||||
|
||||
foreach(protocol_file IN LISTS arg_FILES)
|
||||
get_filename_component(protocol_name "${protocol_file}" NAME_WLE)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user