GL/Context: Support fbdev

This commit is contained in:
Connor McLaughlin
2021-02-14 02:51:26 +10:00
parent f5d7fec914
commit f7426b0988
4 changed files with 25 additions and 3 deletions

View File

@ -37,7 +37,8 @@ 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)
option(USE_DRMKMS "Support DRM/KMS OpenGL contexts" OFF)
option(USE_FBDEV "Support FBDev OpenGL contexts" OFF)
endif()
# Force EGL when using Wayland
@ -115,11 +116,17 @@ if(USE_WAYLAND)
find_package(Wayland REQUIRED Egl)
message(STATUS "Wayland support enabled")
endif()
if(USE_DRMKMS AND USE_FBDEV)
message(FATAL_ERROR "Only one of DRM/KMS and FBDev can be enabled")
endif()
if(USE_DRMKMS)
find_package(GBM REQUIRED)
find_package(Libdrm REQUIRED)
message(STATUS "DRM/KMS support enabled")
endif()
if(USE_FBDEV)
message(STATUS "FBDev Support enabled")
endif()
# Set _DEBUG macro for Debug builds.
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")