diff --git a/meson.build b/meson.build index ec5d5555c4e86..c2f6966e7ea37 100644 --- a/meson.build +++ b/meson.build @@ -1147,9 +1147,10 @@ if features['egl-angle'] sources += files('video/out/opengl/angle_dynamic.c') endif -egl_dep = cc.find_library('EGL', required: get_option('egl-angle-lib')) +egl_dep = cc.find_library('EGL', required: + get_option('egl-angle-lib').require(features['egl-angle'])) egl_angle_lib = get_option('egl-angle-lib').require( - features['egl-angle'] and cc.has_function('eglCreateWindowSurface', + egl_dep.found() and cc.has_function('eglCreateWindowSurface', dependencies: egl_dep, prefix: '#include '), error_message: 'egl-angle-lib could not be found!',