meson: add missing libweston EGL dependency if renderer-gl is enabled

If the 'renderer-gl' option is enabled, ENABLE_EGL is defined, and
libweston/pixel-formats.c includes EGL/egl.h. This requires an egl
dependency, as X11-less platforms need the MESA_EGL_NO_X11_HEADERS
define from egl.pc cflags:

  In file included from /usr/include/EGL/egl.h:39:0,
                   from ../libweston/pixel-formats.c:42:
  /usr/include/EGL/eglplatform.h:124:10: fatal error: X11/Xlib.h: No such file or directory
  compilation terminated.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
dev
Philipp Zabel 6 years ago committed by Philipp Zabel
parent c58648b0df
commit cca7346557
  1. 13
      libweston/meson.build

@ -67,6 +67,14 @@ install_headers(
subdir: dir_include_libweston subdir: dir_include_libweston
) )
if get_option('renderer-gl')
dep_egl = dependency('egl', required: false)
if not dep_egl.found()
error('libweston + gl-renderer requires egl which was not found. Or, you can use \'-Drenderer-gl=false\'.')
endif
deps_libweston += dep_egl
endif
lib_weston = shared_library( lib_weston = shared_library(
'weston-@0@'.format(libweston_major), 'weston-@0@'.format(libweston_major),
srcs_libweston, srcs_libweston,
@ -375,11 +383,10 @@ if get_option('backend-x11')
endif endif
if get_option('renderer-gl') if get_option('renderer-gl')
d = dependency('egl', required: false) if not dep_egl.found()
if not d.found()
error('x11-backend + gl-renderer requires egl which was not found. Or, you can use \'-Dbackend-x11=false\' or \'-Drenderer-gl=false\'.') error('x11-backend + gl-renderer requires egl which was not found. Or, you can use \'-Dbackend-x11=false\' or \'-Drenderer-gl=false\'.')
endif endif
deps_x11 += d deps_x11 += dep_egl
endif endif
plugin_x11 = shared_library( plugin_x11 = shared_library(

Loading…
Cancel
Save