Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ add_subdirectory(test_im_candidate_panel_xprop)
add_subdirectory(test_input_manager)
add_subdirectory(test_keyboard_state_notify)
add_subdirectory(test_glass)
add_subdirectory(test-window-transition)
30 changes: 30 additions & 0 deletions examples/test-window-transition/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
find_package(Qt6 REQUIRED COMPONENTS Gui WaylandClient Widgets)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): The example links Qt6::GuiPrivate and Qt6::WaylandClientPrivate unconditionally, although those components are found only when Qt6 is at least 6.10. On older supported Qt6 versions the configure step references unavailable imported targets and the example cannot be configured or built.

Triggers: When configuring with Qt6 older than 6.10.

Suggested fix: Make the private-module links conditional as well, or require Qt6 6.10+ unconditionally before configuring this example.

Suggested change
find_package(Qt6 REQUIRED COMPONENTS Gui WaylandClient Widgets)
find_package(Qt6 6.10 REQUIRED COMPONENTS Gui WaylandClient Widgets)

if(Qt6_VERSION VERSION_GREATER_EQUAL 6.10)
find_package(Qt6 REQUIRED COMPONENTS GuiPrivate WaylandClientPrivate)
endif()
find_package(PkgConfig REQUIRED)
pkg_get_variable(WAYLAND_PROTOCOLS_DATADIR wayland-protocols pkgdatadir)
find_package(TreelandProtocols REQUIRED)

set(BIN_NAME test-window-transition)

qt_add_executable(${BIN_NAME}
main.cpp
)

qt_generate_wayland_protocol_client_sources(${BIN_NAME}
FILES
${WAYLAND_PROTOCOLS_DATADIR}/staging/xdg-activation/xdg-activation-v1.xml
${TREELAND_PROTOCOLS_DATA_DIR}/treeland-window-transition-unstable-v1.xml
)

target_link_libraries(${BIN_NAME}
PRIVATE
Qt6::Gui
Qt6::Widgets
Qt6::WaylandClient
Qt6::GuiPrivate
Qt6::WaylandClientPrivate
)

install(TARGETS ${BIN_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
Loading
Loading