mirror of https://github.com/encounter/SDL.git
Separate EGL / GL ES detection in CMake
This commit is contained in:
parent
faf760d203
commit
1c6d55767c
|
@ -563,25 +563,29 @@ macro(CheckOpenGLESX11)
|
||||||
if(VIDEO_OPENGLES)
|
if(VIDEO_OPENGLES)
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES)
|
int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGL_EGL)
|
||||||
if(HAVE_VIDEO_OPENGLES)
|
if(HAVE_VIDEO_OPENGL_EGL)
|
||||||
check_c_source_compiles("
|
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||||
#include <GLES/gl.h>
|
endif(HAVE_VIDEO_OPENGL_EGL)
|
||||||
#include <GLES/glext.h>
|
check_c_source_compiles("
|
||||||
int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V1)
|
#include <GLES/gl.h>
|
||||||
if(HAVE_VIDEO_OPENGLES_V1)
|
#include <GLES/glext.h>
|
||||||
|
int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V1)
|
||||||
|
if(HAVE_VIDEO_OPENGLES_V1)
|
||||||
|
set(HAVE_VIDEO_OPENGLES TRUE)
|
||||||
set(SDL_VIDEO_OPENGL_ES 1)
|
set(SDL_VIDEO_OPENGL_ES 1)
|
||||||
set(SDL_VIDEO_RENDER_OGL_ES 1)
|
set(SDL_VIDEO_RENDER_OGL_ES 1)
|
||||||
endif(HAVE_VIDEO_OPENGLES_V1)
|
endif(HAVE_VIDEO_OPENGLES_V1)
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <GLES2/gl2.h>
|
#include <GLES2/gl2.h>
|
||||||
#include <GLES2/gl2ext.h>
|
#include <GLES2/gl2ext.h>
|
||||||
int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V2)
|
int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V2)
|
||||||
if(HAVE_VIDEO_OPENGLES_V2)
|
if(HAVE_VIDEO_OPENGLES_V2)
|
||||||
|
set(HAVE_VIDEO_OPENGLES TRUE)
|
||||||
set(SDL_VIDEO_OPENGL_ES2 1)
|
set(SDL_VIDEO_OPENGL_ES2 1)
|
||||||
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
||||||
endif(HAVE_VIDEO_OPENGLES_V2)
|
endif(HAVE_VIDEO_OPENGLES_V2)
|
||||||
endif(HAVE_VIDEO_OPENGLES)
|
|
||||||
endif(VIDEO_OPENGLES)
|
endif(VIDEO_OPENGLES)
|
||||||
endmacro(CheckOpenGLESX11)
|
endmacro(CheckOpenGLESX11)
|
||||||
|
|
||||||
|
|
|
@ -293,6 +293,7 @@
|
||||||
#cmakedefine SDL_VIDEO_OPENGL_CGL @SDL_VIDEO_OPENGL_CGL@
|
#cmakedefine SDL_VIDEO_OPENGL_CGL @SDL_VIDEO_OPENGL_CGL@
|
||||||
#cmakedefine SDL_VIDEO_OPENGL_GLX @SDL_VIDEO_OPENGL_GLX@
|
#cmakedefine SDL_VIDEO_OPENGL_GLX @SDL_VIDEO_OPENGL_GLX@
|
||||||
#cmakedefine SDL_VIDEO_OPENGL_WGL @SDL_VIDEO_OPENGL_WGL@
|
#cmakedefine SDL_VIDEO_OPENGL_WGL @SDL_VIDEO_OPENGL_WGL@
|
||||||
|
#cmakedefine SDL_VIDEO_OPENGL_EGL @SDL_VIDEO_OPENGL_EGL@
|
||||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA @SDL_VIDEO_OPENGL_OSMESA@
|
#cmakedefine SDL_VIDEO_OPENGL_OSMESA @SDL_VIDEO_OPENGL_OSMESA@
|
||||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@
|
#cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue