1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-30 19:52:14 +00:00

build: add check for eglext_angle.h when checking for ANGLE

This better follows the actual required bits, and makes sure that
a file not part of standard EGL headers is available, as the
handle type is part of standard EGL extensions header.
This commit is contained in:
Kacper Michajłow 2023-03-30 15:24:22 +02:00 committed by Jan Ekström
parent 911d742817
commit 9d120a4411
2 changed files with 11 additions and 5 deletions

View File

@ -1104,9 +1104,14 @@ if features['gl-dxinterop']
endif
egl_angle = get_option('egl-angle').require(
features['gl-win32'] and cc.has_header_symbol('EGL/eglext.h',
'EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE',
prefix: '#include <EGL/egl.h>'),
features['gl-win32'] and
cc.has_header_symbol('EGL/eglext.h',
'EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE',
prefix: '#include <EGL/egl.h>') and
cc.has_header_symbol('EGL/eglext_angle.h',
'PFNEGLCREATEDEVICEANGLEPROC',
# TODO: change to list when meson 1.0.0 is required
prefix: '#include <EGL/egl.h>\n#include <EGL/eglext.h>'),
error_message: 'egl-angle could not be found!',
)
features += {'egl-angle': egl_angle.allowed()}

View File

@ -637,8 +637,9 @@ video_output_features = [
'desc': 'OpenGL ANGLE headers',
'deps': 'os-win32 || os-cygwin',
'groups': [ 'gl' ],
'func': check_statement(['EGL/egl.h', 'EGL/eglext.h'],
'int x = EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE')
'func': check_statement(['EGL/egl.h', 'EGL/eglext.h', 'EGL/eglext_angle.h'],
'int x = EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE; '
'PFNEGLCREATEDEVICEANGLEPROC y = NULL')
} , {
'name': '--egl-angle-lib',
'desc': 'OpenGL Win32 ANGLE Library',