SDL
SDL copied to clipboard
cmake: test for EGL and GLES on Windows, avoid EGL test on MSVC
For MSVC platforms, SDL3/SDL_egl.h has the following conditional to avoid including a system EGL/egl.h:
https://github.com/libsdl-org/SDL/blob/dd955332a2795d8b60731b1864eeab44341baf8d/include/SDL3/SDL_egl.h#L28
Perhaps this should include Windows platforms?
If a CMake test is preferred, we were only detecting egl.h for the unix platforms.
This pr adds a test for the Windows platform.
When using MSVC, it avoids a check for <EGL/egl.h> and <EGL/eglext.h> includes.
It adds checks for
<GLES/gl.h>and<GLES/glext.h>includes inCheckOpenGLESforSDL_VIDEO_OPENGL_ES<GLES2/gl2.h>and<GLES2/gl2ext.h>includes inCheckOpenGLESforSDL_VIDEO_OPENGL_ES2
The MSVC behavior should be the same, but please review.
Existing Issue(s)
Fixes https://github.com/libsdl-org/SDL/issues/11216