From 8bae933073e639fb5603abc190e0db0bf1dd86d5 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 20 Apr 2023 14:22:03 +0100 Subject: [PATCH] better searching for egl --- CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c439e5..278307e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -305,14 +305,18 @@ target_link_libraries(linux-wallpaperengine glfw) if (ENABLE_WAYLAND) + # finding EGL is a bit troublesome + pkg_check_modules(PKG_EGL QUIET egl) + find_library(EGL_LIBRARY NAMES EGL libEGL HINTS ${PKG_EGL_LIBRARY_DIRS}) + add_library(EGL::EGL UNKNOWN IMPORTED) + target_link_libraries(linux-wallpaperengine ${CMAKE_SOURCE_DIR}/wlr-layer-shell-unstable-v1-protocol.o ${CMAKE_SOURCE_DIR}/xdg-shell-protocol.o - GLESv2 pthread wayland-cursor - /usr/lib/libEGL.so.1 wayland-client - wayland-egl) + wayland-egl + ${EGL_LIBRARY}) endif() file(CREATE_LINK linux-wallpaperengine wallengine SYMBOLIC)