| Summary: | EGL_NO_X11 ignored by EGL find_package | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] extra-cmake-modules | Reporter: | Rinigus <rinigus.git> |
| Component: | general | Assignee: | ecm-bugs-null <ecm-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | rinigus.git |
| Priority: | NOR | Keywords: | X11-only |
| Version First Reported In: | 5.105.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Adding the x11-only keyword |
SUMMARY On platform without X11, find_package(EGL) fails as it tries to compile code without EGL_NO_X11 define. This was encountered on SailfishOS where we have the following pkg-config EGL file: ``` [root@fdebf063bc5a builder]# cat /usr/lib/pkgconfig/egl.pc prefix=/usr libdir=${prefix}/lib includedir=${prefix}/include Name: egl Description: Mesa EGL Library Version: 21.1.6 Requires.private: libdrm >= 2.4.75 Libs: -L${libdir} -lEGL Libs.private: -lpthread -pthread -lm -ldl Cflags: -I${includedir} -DEGL_NO_X11 ``` As -DEGL_NO_X11 was not used while checking for code compilation, HAVE_EGL was set to false. I am not an expert in CMake, but it looks like that define option should be somewhere here: https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/master/find-modules/FindEGL.cmake#L100 SOFTWARE/OS VERSIONS Linux/KDE Plasma: SailfishOS 4.5 (available in About System) KDE Plasma Version: - KDE Frameworks Version: 5.105.0 Qt Version: 5.15.8