Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: test for EGL and GLES on Windows, avoid EGL test on MSVC #11244

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Oct 17, 2024

For MSVC platforms, SDL3/SDL_egl.h has the following conditional to avoid including a system EGL/egl.h:

#if !defined(_MSC_VER) && !defined(SDL_PLATFORM_ANDROID) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS)

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 in CheckOpenGLES for SDL_VIDEO_OPENGL_ES
  • <GLES2/gl2.h> and <GLES2/gl2ext.h> includes in CheckOpenGLES for SDL_VIDEO_OPENGL_ES2

The MSVC behavior should be the same, but please review.

Existing Issue(s)

Fixes #11216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building with MSYS: Cannot file EGL/egl.h
1 participant