diff --git a/CMakeLists.txt b/CMakeLists.txt index 29bac162e5..93aa2b4915 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,10 +54,7 @@ if(KWIN_BUILD_OPENGL) include_directories(${OPENGL_INCLUDE_DIR}) endif() -if(OPENGL_EGL_FOUND) - include_directories(${OPENGLES_EGL_INCLUDE_DIR}) - set(KWIN_HAVE_EGL 1) -endif() +set(KWIN_HAVE_EGL ${EGL_FOUND}) if(KWIN_BUILD_OPENGLES) include_directories(${OPENGLES_INCLUDE_DIR}) @@ -311,8 +308,8 @@ if(KWIN_BUILD_ACTIVITIES) set(kwin_KDE_LIBS ${kwin_KDE_LIBS} KF5::Activities) endif() -if(OPENGL_EGL_FOUND) - set(kwin_OPENGL_LIBS ${kwin_OPENGL_LIBS} ${OPENGLES_EGL_LIBRARY}) +if(KWIN_HAVE_EGL) + set(kwin_OPENGL_LIBS ${kwin_OPENGL_LIBS} EGL::EGL) endif() set(kwinLibs diff --git a/libkwineffects/CMakeLists.txt b/libkwineffects/CMakeLists.txt index 5e82e3e216..6897a01124 100644 --- a/libkwineffects/CMakeLists.txt +++ b/libkwineffects/CMakeLists.txt @@ -47,14 +47,11 @@ set(kwin_GLUTILSLIB_SRCS macro( KWIN4_ADD_GLUTILS_BACKEND name glinclude ) include_directories(${glinclude}) - if(OPENGL_EGL_FOUND) - include_directories(${OPENGLES_EGL_INCLUDE_DIR}) - endif() add_library(${name} SHARED ${kwin_GLUTILSLIB_SRCS}) generate_export_header(kwinglutils EXPORT_FILE_NAME kwinglutils_export.h) target_link_libraries(${name} PUBLIC Qt5::DBus Qt5::X11Extras ${XCB_XCB_LIBRARY}) - if(OPENGL_EGL_FOUND) - target_link_libraries(${name} PRIVATE ${OPENGLES_EGL_LIBRARY}) + if(KWIN_HAVE_EGL) + target_link_libraries(${name} PRIVATE EGL::EGL) endif() set_target_properties(${name} PROPERTIES VERSION 1.0.0 SOVERSION 1 ) target_link_libraries(${name} PUBLIC ${ARGN})