WebPlatformForEmbedded/libwpe

Meson: EGL library compilation flags not passed to compiler

Closed this issue · 1 comments

In some cases the pkg-config egl.pc module file may define flags which need to be passed to the compiler, and currently the Meson build system is ignoring them.

A typical situation is having Mesa provide the EGL implementation, but Mesa itself has been compiled without X11 support. In that case egl.pc will contain the following line:

Cflags: -I${includedir} -DEGL_NO_X11    

In this case not passing the compiler flags results in compilation errors if the X11 headers happen to not be installed by chance in the system—which can very easily happen with Yocto and Buildroot, for example.

For reference: the CMake build system always tries to use FindEGL.cmake and then extracts the compiler options from the imported target created by it, but makes it non-required to accommodate EGL implementations which do not provide a pkg-config module.

Let's make the Meson build system do the same.