Common: Add DRM display helper class and GBM GL context

This commit is contained in:
Connor McLaughlin
2021-01-31 02:25:05 +10:00
parent b267020d07
commit b09da307b5
15 changed files with 946 additions and 12 deletions

View File

@ -36,6 +36,9 @@ endif()
if(LINUX OR ANDROID)
option(USE_EGL "Support EGL OpenGL context creation" ON)
endif()
if(LINUX AND NOT ANDROID)
option(USE_DRMKMS "Support DRM/KMS display and contexts" OFF)
endif()
# Force EGL when using Wayland
if(USE_WAYLAND)
@ -112,6 +115,11 @@ if(USE_WAYLAND)
find_package(Wayland REQUIRED Egl)
message(STATUS "Wayland support enabled")
endif()
if(USE_DRMKMS)
find_package(GBM REQUIRED)
find_package(Libdrm REQUIRED)
message(STATUS "DRM/KMS support enabled")
endif()
# Set _DEBUG macro for Debug builds.
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")