From: Matthew Waters Date: Wed, 5 Sep 2018 08:34:06 +0000 (+1000) Subject: gl/meson: check for EGL headers before allowing use of EGL X-Git-Tag: 1.19.3~511^2~1499 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22f6ff094aa71bfd8c6d7b49559350c624e22be7;p=platform%2Fupstream%2Fgstreamer.git gl/meson: check for EGL headers before allowing use of EGL For distros that provide headers in seperate dev/devel packages this won't build egl support without the necessary EGL headers. --- diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build index 51a2603..31340a5 100644 --- a/gst-libs/gst/gl/meson.build +++ b/gst-libs/gst/gl/meson.build @@ -459,10 +459,17 @@ if need_platform_egl != 'no' egl_dep = dependency('egl', required : false) if not egl_dep.found() egl_dep = cc.find_library('EGL', required : false) + endif - if not egl_dep.found() and need_platform_egl == 'yes' - error ('Could not find requested EGL library') - endif + if egl_dep.found() and not cc.has_header('EGL/egl.h', + dependencies : egl_dep, + include_directories : compat_includes) + egl_dep = unneeded_dep + endif + if egl_dep.found() and not cc.has_header('EGL/eglext.h', + dependencies : egl_dep, + include_directories : compat_includes) + egl_dep = unneeded_dep endif if egl_dep.found() @@ -492,8 +499,9 @@ if need_platform_egl != 'no' #include ''' enabled_gl_platforms += 'egl' + elif need_platform_egl == 'yes' + error ('Could not find requested EGL library') endif - endif # wayland checks