diff options
author | Wolfgang Haupt <haupt.wolfgang@gmail.com> | 2018-07-27 12:39:19 +0200 |
---|---|---|
committer | Wolfgang Haupt <haupt.wolfgang@gmail.com> | 2018-08-02 18:48:38 +0200 |
commit | 88a638184760ed773d0d26dd2b63f939ee601b37 (patch) | |
tree | 8a603036b6cb5011c0c46d0c959947982286f251 /cmake/platform | |
parent | 80be9d22a1e1b6d0b1edb71893f42d68240cbe6d (diff) |
Windowing: GBM - add OpenGL support
Diffstat (limited to 'cmake/platform')
-rw-r--r-- | cmake/platform/linux/gbm.cmake | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/cmake/platform/linux/gbm.cmake b/cmake/platform/linux/gbm.cmake index 28b400a4e6..e5b44ada46 100644 --- a/cmake/platform/linux/gbm.cmake +++ b/cmake/platform/linux/gbm.cmake @@ -1,5 +1,17 @@ -set(PLATFORM_REQUIRED_DEPS OpenGLES EGL GBM LibDRM LibInput Xkbcommon) +set(PLATFORM_REQUIRED_DEPS EGL GBM LibDRM LibInput Xkbcommon) set(PLATFORM_OPTIONAL_DEPS VAAPI) -set(APP_RENDER_SYSTEM gles) + +set(GBM_RENDER_SYSTEM "" CACHE STRING "Render system to use with GBM: \"gl\" or \"gles\"") + +if(GBM_RENDER_SYSTEM STREQUAL "gl") + list(APPEND PLATFORM_REQUIRED_DEPS OpenGl) + set(APP_RENDER_SYSTEM gl) +elseif(GBM_RENDER_SYSTEM STREQUAL "gles") + list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES) + set(APP_RENDER_SYSTEM gles) +else() + message(SEND_ERROR "You need to decide whether you want to use GL- or GLES-based rendering in combination with the GBM windowing system. Please set GBM_RENDER_SYSTEM to either \"gl\" or \"gles\". For normal desktop systems, you will usually want to use \"gl\".") +endif() + # __GBM__ is needed by eglplatform.h in case it is included before gbm.h list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS -D__GBM__=1 -DPLATFORM_SETTINGS_FILE=gbm.xml) |