From dbed987d07b7f81b836c8356e25063ba71266f21 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Thu, 10 Oct 2024 19:46:05 +0200 Subject: Implement the groundwork for wayland support. (#2803) During compile time try to detect libwayland-client-dev is installed, - If yes, compile a viewer which can run and start under wayland. libwayland-client is needed to detect if the viewer is hidden/minimized. - if no, disable wayland support and refuse to start the viewer under wayland (xwayland is okay). To not introduce a hard link dependency on libwayland-client.so the object will be loaded dynamically if needed. --- indra/cmake/UI.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/cmake/UI.cmake') diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index ae039b4a47..a407f68db3 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -13,6 +13,15 @@ if (LINUX) return() endif() + include(FindPkgConfig) + pkg_check_modules(WAYLAND_CLIENT wayland-client) + + if( WAYLAND_CLIENT_FOUND ) + target_compile_definitions( ll::uilibraries INTERFACE LL_WAYLAND=1) + else() + message("pkgconfig could not find wayland client, compiling without full wayland support") + endif() + target_link_libraries( ll::uilibraries INTERFACE fltk Xrender -- cgit v1.2.3