1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 03:05:48 +03:00
aports/community/plasma-framework/0001-fix-build.patch
2021-07-12 09:31:01 +00:00

36 lines
1.4 KiB
Diff

https://invent.kde.org/frameworks/plasma-framework/-/commit/a70957d96c29aa6059753cbfe23d0615ea688b36 and others broke compilation, as CMake's FindOpenGL is broken and assumes packages we do not have and shouldn't be needed either.
Let's make sure OpenGL::EGL is only used if it's actually found.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7f8164cd..f757f07b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -121,12 +121,9 @@ add_feature_info(EGL ${OpenGL_EGL_FOUND}
"A platform-agnostic mechanism for creating rendering surfaces for use with other graphics libraries, such as OpenGL|ES and OpenVG.")
# OpenGL_EGL_FOUND is defined by FindOpenGL
if(TARGET OpenGL::EGL)
- set(HAVE_EGL ${OpenGL_EGL_FOUND})
- set(EGL_TARGET OpenGL::EGL)
-elseif(${EGL_FOUND})
- set(HAVE_EGL ${EGL_FOUND})
- set(EGL_TARGET EGL::EGL)
- message(STATUS "Switch to EGL compatibility target EGL::EGL because OpenGL::EGL is not available")
+ set(HAVE_EGL 1)
+else()
+ set(HAVE_EGL 0)
endif()
diff --git a/src/declarativeimports/core/CMakeLists.txt b/src/declarativeimports/core/CMakeLists.txt
index df0023921..ace8e3a8e 100644
--- a/src/declarativeimports/core/CMakeLists.txt
+++ b/src/declarativeimports/core/CMakeLists.txt
@@ -58,7 +58,7 @@ if(HAVE_X11)
endif()
if(HAVE_EGL)
- target_link_libraries(corebindingsplugin ${EGL_TARGET})
+ target_link_libraries(corebindingsplugin OpenGL::EGL)
else()
endif()