cmake/sdlchecks.cmake
changeset 7690 76d7b6007a64
parent 7521 03bca9a4180d
child 7835 4be86f76e710
     1.1 --- a/cmake/sdlchecks.cmake	Thu Aug 22 13:32:27 2013 -0400
     1.2 +++ b/cmake/sdlchecks.cmake	Thu Aug 22 14:56:07 2013 -0300
     1.3 @@ -563,25 +563,29 @@
     1.4    if(VIDEO_OPENGLES)
     1.5      check_c_source_compiles("
     1.6          #include <EGL/egl.h>
     1.7 -        int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES)
     1.8 -    if(HAVE_VIDEO_OPENGLES)
     1.9 -      check_c_source_compiles("
    1.10 -          #include <GLES/gl.h>
    1.11 -          #include <GLES/glext.h>
    1.12 -          int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V1)
    1.13 -      if(HAVE_VIDEO_OPENGLES_V1)
    1.14 +        int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGL_EGL)
    1.15 +    if(HAVE_VIDEO_OPENGL_EGL)
    1.16 +        set(SDL_VIDEO_OPENGL_EGL 1)
    1.17 +    endif(HAVE_VIDEO_OPENGL_EGL) 
    1.18 +    check_c_source_compiles("
    1.19 +      #include <GLES/gl.h>
    1.20 +      #include <GLES/glext.h>
    1.21 +      int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V1)
    1.22 +    if(HAVE_VIDEO_OPENGLES_V1)
    1.23 +        set(HAVE_VIDEO_OPENGLES TRUE)
    1.24          set(SDL_VIDEO_OPENGL_ES 1)
    1.25          set(SDL_VIDEO_RENDER_OGL_ES 1)
    1.26 -      endif(HAVE_VIDEO_OPENGLES_V1)
    1.27 -      check_c_source_compiles("
    1.28 -          #include <GLES2/gl2.h>
    1.29 -          #include <GLES2/gl2ext.h>
    1.30 -          int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V2)
    1.31 -      if(HAVE_VIDEO_OPENGLES_V2)
    1.32 +    endif(HAVE_VIDEO_OPENGLES_V1)
    1.33 +    check_c_source_compiles("
    1.34 +      #include <GLES2/gl2.h>
    1.35 +      #include <GLES2/gl2ext.h>
    1.36 +      int main (int argc, char** argv) {}" HAVE_VIDEO_OPENGLES_V2)
    1.37 +    if(HAVE_VIDEO_OPENGLES_V2)
    1.38 +        set(HAVE_VIDEO_OPENGLES TRUE)
    1.39          set(SDL_VIDEO_OPENGL_ES2 1)
    1.40          set(SDL_VIDEO_RENDER_OGL_ES2 1)
    1.41 -      endif(HAVE_VIDEO_OPENGLES_V2)
    1.42 -    endif(HAVE_VIDEO_OPENGLES)
    1.43 +    endif(HAVE_VIDEO_OPENGLES_V2)
    1.44 +
    1.45    endif(VIDEO_OPENGLES)
    1.46  endmacro(CheckOpenGLESX11)
    1.47