From 3cb8aa05f8cee9e860cf83531682ff0ed4af6a4f Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 4 Mar 2021 23:36:40 +0100 Subject: sync with upstream --- cmake/platform/freebsd/x11.cmake | 5 ++--- cmake/platform/linux/gbm.cmake | 17 ++++------------- cmake/platform/linux/wayland.cmake | 17 +++++------------ cmake/platform/linux/x11.cmake | 16 ++++------------ 4 files changed, 15 insertions(+), 40 deletions(-) (limited to 'cmake/platform') diff --git a/cmake/platform/freebsd/x11.cmake b/cmake/platform/freebsd/x11.cmake index 09cebde..307dac3 100644 --- a/cmake/platform/freebsd/x11.cmake +++ b/cmake/platform/freebsd/x11.cmake @@ -1,3 +1,2 @@ -set(PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM) -set(PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX) -set(APP_RENDER_SYSTEM gl) +list(APPEND PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM) +list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX) diff --git a/cmake/platform/linux/gbm.cmake b/cmake/platform/linux/gbm.cmake index 75b23f3..8f17ef6 100644 --- a/cmake/platform/linux/gbm.cmake +++ b/cmake/platform/linux/gbm.cmake @@ -1,17 +1,8 @@ -set(PLATFORM_REQUIRED_DEPS EGL GBM LibDRM LibInput Xkbcommon) -set(PLATFORM_OPTIONAL_DEPS VAAPI) +list(APPEND PLATFORM_REQUIRED_DEPS EGL GBM LibDRM LibInput Xkbcommon) +list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI) -set(GBM_RENDER_SYSTEM "" CACHE STRING "Render system to use with GBM: \"gl\" or \"gles\"") - -if(GBM_RENDER_SYSTEM STREQUAL "gl") +if(APP_RENDER_SYSTEM STREQUAL "gl") list(APPEND PLATFORM_REQUIRED_DEPS OpenGl) - set(APP_RENDER_SYSTEM gl) -elseif(GBM_RENDER_SYSTEM STREQUAL "gles") +elseif(APP_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 -DEGL_NO_X11 -D__GBM__=1 -DPLATFORM_SETTINGS_FILE=gbm.xml) diff --git a/cmake/platform/linux/wayland.cmake b/cmake/platform/linux/wayland.cmake index 916b578..1adcd8f 100644 --- a/cmake/platform/linux/wayland.cmake +++ b/cmake/platform/linux/wayland.cmake @@ -1,21 +1,14 @@ -set(PLATFORM_REQUIRED_DEPS WaylandProtocols>=1.7 Waylandpp>=0.2.2 LibDRM Xkbcommon>=0.4.1) -set(PLATFORM_OPTIONAL_DEPS VAAPI) +list(APPEND PLATFORM_REQUIRED_DEPS WaylandProtocols>=1.7 Waylandpp>=0.2.2 LibDRM Xkbcommon>=0.4.1) +list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI) -set(WAYLAND_RENDER_SYSTEM "" CACHE STRING "Render system to use with Wayland: \"gl\" or \"gles\"") - -if(WAYLAND_RENDER_SYSTEM STREQUAL "gl") +if(APP_RENDER_SYSTEM STREQUAL "gl") list(APPEND PLATFORM_REQUIRED_DEPS OpenGl EGL) - set(APP_RENDER_SYSTEM gl) -elseif(WAYLAND_RENDER_SYSTEM STREQUAL "gles") +elseif(APP_RENDER_SYSTEM STREQUAL "gles") list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES EGL) - 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 Wayland windowing system. Please set WAYLAND_RENDER_SYSTEM to either \"gl\" or \"gles\". For normal desktop systems, you will usually want to use \"gl\".") endif() set(PLATFORM_GLOBAL_TARGET_DEPS generate-wayland-extra-protocols) set(WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}") -# WL_EGL_PLATFORM is needed by eglplatform.h in case it is included before wayland-egl.h -list(APPEND PLATFORM_DEFINES -DWL_EGL_PLATFORM=1 -DPLATFORM_SETTINGS_FILE=wayland.xml) + # for wayland-extra-protocols.hpp include_directories("${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}") diff --git a/cmake/platform/linux/x11.cmake b/cmake/platform/linux/x11.cmake index 5d7f3d4..5f5b8c2 100644 --- a/cmake/platform/linux/x11.cmake +++ b/cmake/platform/linux/x11.cmake @@ -1,17 +1,9 @@ -set(PLATFORM_REQUIRED_DEPS EGL X XRandR LibDRM) -set(PLATFORM_OPTIONAL_DEPS VAAPI) +list(APPEND PLATFORM_REQUIRED_DEPS EGL X XRandR LibDRM) +list(APPEND 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") +if(APP_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") +elseif(APP_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