Fixed bug 4643 - Append EGL CFLAGS in CheckOpenGLESX11
authorSam Lantinga <slouken@libsdl.org>
Mon, 02 Mar 2020 15:24:10 -0800
changeset 1358285c4a2f0464d
parent 13581 735c5920fc62
child 13583 88068887c25d
Fixed bug 4643 - Append EGL CFLAGS in CheckOpenGLESX11

Danilo Spinella

EGL need -DMESA_EGL_NO_X11_HEADERS in systems without X11 installed. Make CMake checks import EGL CFLAGS.

Relevant bug: https://bugzilla.libsdl.org/show_bug.cgi?id=4243
cmake/sdlchecks.cmake
     1.1 --- a/cmake/sdlchecks.cmake	Mon Mar 02 15:21:07 2020 -0800
     1.2 +++ b/cmake/sdlchecks.cmake	Mon Mar 02 15:24:10 2020 -0800
     1.3 @@ -757,8 +757,10 @@
     1.4  endmacro()
     1.5  
     1.6  # Requires:
     1.7 -# - nada
     1.8 +# - PkgCheckModules
     1.9  macro(CheckOpenGLESX11)
    1.10 +  pkg_check_modules(EGL egl)
    1.11 +  set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${EGL_CFLAGS}")
    1.12    if(VIDEO_OPENGLES)
    1.13      check_c_source_compiles("
    1.14          #define EGL_API_FB