From 4ad3e927305edd2def9c706770a6672796042f04 Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Wed, 14 May 2025 18:19:31 -0400 Subject: [PATCH] Add wayland client libraries conditionally --- scwx-qt/scwx-qt.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index 1628607a..0e8b2ef1 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -688,6 +688,16 @@ if (MSVC) else() target_compile_options(scwx-qt PRIVATE "$<$:-g>") target_compile_options(supercell-wx PRIVATE "$<$:-g>") + + # Add wayland client packages + find_package(QT NAMES Qt6 + COMPONENTS WaylandClient + REQUIRED) + + find_package(Qt${QT_VERSION_MAJOR} + COMPONENTS WaylandClient + REQUIRED) + target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::WaylandClient) endif() target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets