Skip to content

Don't fallback to EGL::EGL, just don't link to EGL when it's not found

Bart Ribbers requested to merge bribbers/plasma-framework:egl into master

EGL::EGL is not actually enough to compile. If you do link against it several functions are undefined:

/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: CMakeFiles/corebindingsplugin.dir/windowthumbnail.cpp.o: in function `Plasma::WindowThumbnail::xcbWindowToTextureEGL(Plasma::WindowTextureNode*)':
windowthumbnail.cpp:(.text+0xc50): undefined reference to `glGetString'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: windowthumbnail.cpp:(.text+0xd88): undefined reference to `glGenTextures'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: CMakeFiles/corebindingsplugin.dir/windowthumbnail.cpp.o: in function `Plasma::DiscardEglPixmapRunnable::run()':
windowthumbnail.cpp:(.text+0x30): undefined reference to `glDeleteTextures'
collect2: error: ld returned 1 exit status
make[2]: *** [src/declarativeimports/core/CMakeFiles/corebindingsplugin.dir/build.make:359: bin/libcorebindingsplugin.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:2825: src/declarativeimports/core/CMakeFiles/corebindingsplugin.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

See https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/256#note_258254 for the history before this MR.

CC @ahiemstra

Merge request reports