From 2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 30 Aug 2018 00:42:04 +0200 Subject: sync with upstream --- cmake/platform/linux/gbm.cmake | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'cmake/platform/linux/gbm.cmake') diff --git a/cmake/platform/linux/gbm.cmake b/cmake/platform/linux/gbm.cmake index d8e73d0..e5b44ad 100644 --- a/cmake/platform/linux/gbm.cmake +++ b/cmake/platform/linux/gbm.cmake @@ -1,4 +1,17 @@ -set(PLATFORM_REQUIRED_DEPS OpenGLES EGL GBM LibDRM) +set(PLATFORM_REQUIRED_DEPS EGL GBM LibDRM LibInput Xkbcommon) set(PLATFORM_OPTIONAL_DEPS VAAPI) -set(APP_RENDER_SYSTEM gles) -list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS -DPLATFORM_SETTINGS_FILE=gbm.xml) + +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) -- cgit v1.2.3