https://bugs.kde.org/show_bug.cgi?id=469092
Bug ID: 469092 Summary: EGL_NO_X11 ignored by EGL find_package Classification: Frameworks and Libraries Product: extra-cmake-modules Version: 5.105.0 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: ecm-bugs-n...@kde.org Reporter: rinigus....@gmail.com Target Milestone: --- 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 -- You are receiving this mail because: You are watching all bug changes.