From 5f8335c1e49ce108ef3481863833c98efa00411b Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 2 Jul 2020 23:09:26 +0200 Subject: sync with upstream --- cmake/platform/linux/x11.cmake | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'cmake/platform/linux/x11.cmake') diff --git a/cmake/platform/linux/x11.cmake b/cmake/platform/linux/x11.cmake index 72d9640..5d7f3d4 100644 --- a/cmake/platform/linux/x11.cmake +++ b/cmake/platform/linux/x11.cmake @@ -1,4 +1,17 @@ -set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM) -set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX) -set(APP_RENDER_SYSTEM gl) +set(PLATFORM_REQUIRED_DEPS EGL X XRandR LibDRM) +set(PLATFORM_OPTIONAL_DEPS VAAPI) + +set(X11_RENDER_SYSTEM "" CACHE STRING "Render system to use with X11: \"gl\" or \"gles\"") + +if(X11_RENDER_SYSTEM STREQUAL "gl") + list(APPEND PLATFORM_REQUIRED_DEPS OpenGl) + list(APPEND PLATFORM_OPTIONAL_DEPS GLX VDPAU) + set(APP_RENDER_SYSTEM gl) +elseif(X11_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 X11 windowing system. Please set X11_RENDER_SYSTEM to either \"gl\" or \"gles\". For normal desktop systems, you will usually want to use \"gl\".") +endif() + list(APPEND PLATFORM_DEFINES -DPLATFORM_SETTINGS_FILE=x11.xml) \ No newline at end of file -- cgit v1.2.3