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

@ -142,6 +142,14 @@ if(USE_X11)
target_link_libraries(common PRIVATE "${X11_LIBRARIES}")
endif()
if(USE_DRMKMS)
target_sources(common PRIVATE
drm_display.cpp
drm_display.h
)
target_link_libraries(common PUBLIC Libdrm::Libdrm)
endif()
if(USE_EGL)
target_sources(common PRIVATE
gl/context_egl.cpp
@ -161,6 +169,14 @@ if(USE_EGL)
gl/context_egl_android.h
)
endif()
if(USE_DRMKMS)
target_compile_definitions(common PRIVATE "-DUSE_GBM=1")
target_sources(common PRIVATE
gl/context_egl_gbm.cpp
gl/context_egl_gbm.h
)
target_link_libraries(common PUBLIC GBM::GBM)
endif()
endif()
if(USE_X11)