meson: conditionalize searching for ANGLE's EGL

This commit is contained in:
sfan5 2024-03-21 10:12:28 +01:00
parent a392f91170
commit 1d8f28cea7
1 changed files with 3 additions and 2 deletions

View File

@ -1147,9 +1147,10 @@ if features['egl-angle']
sources += files('video/out/opengl/angle_dynamic.c') sources += files('video/out/opengl/angle_dynamic.c')
endif 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( 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, dependencies: egl_dep,
prefix: '#include <EGL/egl.h>'), prefix: '#include <EGL/egl.h>'),
error_message: 'egl-angle-lib could not be found!', error_message: 'egl-angle-lib could not be found!',