From 4e03774cf8c0c43f8a2a1ab8298e364e70af1902 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 20 Apr 2023 21:17:45 +0100 Subject: [PATCH] use egl from cmake find opengl --- CMakeLists.txt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d8cca7..8de531f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -307,18 +307,11 @@ 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 - pthread + target_link_libraries(linux-wallpaperengine pthread wayland-cursor wayland-client wayland-egl - ${EGL_LIBRARY}) + ${OPENGL_egl_LIBRARY}) endif() file(CREATE_LINK linux-wallpaperengine wallengine SYMBOLIC)