[KMSDRM] Enable full OpenGL detection (MESA/libglvnd) on both the make and cmake buildsystems.

This commit is contained in:
vanfanel
2021-03-15 12:53:16 +01:00
committed by Sam Lantinga
parent b98b5adcae
commit e213f37a45
3 changed files with 39 additions and 0 deletions

View File

@@ -777,6 +777,22 @@ macro(CheckVivante)
endif(VIDEO_VIVANTE)
endmacro(CheckVivante)
# Requires:
# - libglvnd
macro(CheckOpenGLKMSDRM)
if(VIDEO_OPENGL AND HAVE_VIDEO_KMSDRM)
check_c_source_compiles("
#include <GL/gl.h>
int main(int argc, char** argv) {}" HAVE_VIDEO_OPENGL)
if(HAVE_VIDEO_OPENGL)
set(HAVE_VIDEO_OPENGL TRUE)
set(SDL_VIDEO_OPENGL 1)
set(SDL_VIDEO_RENDER_OGL 1)
endif()
endif()
endmacro()
# Requires:
# - nada
macro(CheckOpenGLX11)