diff --git a/CMakeLists.txt b/CMakeLists.txt index 11bc21f7f..20f27a1df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,6 +163,7 @@ endif() # We still use gtk on Linux for the file browser dialog in "native" mode) if(LINUX) pkg_check_modules(GTK QUIET IMPORTED_TARGET REQUIRED gtk+-3.0) + pkg_search_module(WAYLAND_CLIENT wayland-client IMPORTED_TARGET GLOBAL REQUIRED) endif() #WORKAROUND Fedora 38 does not include Threads from the glslang .cmake file, fixed in Fedora 39+ diff --git a/src/ngscopeclient/CMakeLists.txt b/src/ngscopeclient/CMakeLists.txt index 26b058204..2cdccd07b 100644 --- a/src/ngscopeclient/CMakeLists.txt +++ b/src/ngscopeclient/CMakeLists.txt @@ -196,6 +196,10 @@ target_include_directories(ngscopeclient #Linker settings if(LINUX) set(PLATFORM_LIBS X11) + if(${WAYLAND_CLIENT_FOUND}) + list(APPEND PLATFORM_LIBS ${WAYLAND_CLIENT_MODULE_NAME}) + target_include_directories(ngscopeclient SYSTEM PRIVATE ${WAYLAND_CLIENT_INCLUDE_DIRS}) + endif () else() set(PLATFORM_LIBS "") endif()