summaryrefslogtreecommitdiffstats
path: root/cmake/platform/linux/wayland.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/platform/linux/wayland.cmake')
-rw-r--r--cmake/platform/linux/wayland.cmake17
1 files changed, 5 insertions, 12 deletions
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 @@
1set(PLATFORM_REQUIRED_DEPS WaylandProtocols>=1.7 Waylandpp>=0.2.2 LibDRM Xkbcommon>=0.4.1) 1list(APPEND PLATFORM_REQUIRED_DEPS WaylandProtocols>=1.7 Waylandpp>=0.2.2 LibDRM Xkbcommon>=0.4.1)
2set(PLATFORM_OPTIONAL_DEPS VAAPI) 2list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI)
3 3
4set(WAYLAND_RENDER_SYSTEM "" CACHE STRING "Render system to use with Wayland: \"gl\" or \"gles\"") 4if(APP_RENDER_SYSTEM STREQUAL "gl")
5
6if(WAYLAND_RENDER_SYSTEM STREQUAL "gl")
7 list(APPEND PLATFORM_REQUIRED_DEPS OpenGl EGL) 5 list(APPEND PLATFORM_REQUIRED_DEPS OpenGl EGL)
8 set(APP_RENDER_SYSTEM gl) 6elseif(APP_RENDER_SYSTEM STREQUAL "gles")
9elseif(WAYLAND_RENDER_SYSTEM STREQUAL "gles")
10 list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES EGL) 7 list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES EGL)
11 set(APP_RENDER_SYSTEM gles)
12else()
13 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\".")
14endif() 8endif()
15 9
16set(PLATFORM_GLOBAL_TARGET_DEPS generate-wayland-extra-protocols) 10set(PLATFORM_GLOBAL_TARGET_DEPS generate-wayland-extra-protocols)
17set(WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}") 11set(WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}")
18# WL_EGL_PLATFORM is needed by eglplatform.h in case it is included before wayland-egl.h 12
19list(APPEND PLATFORM_DEFINES -DWL_EGL_PLATFORM=1 -DPLATFORM_SETTINGS_FILE=wayland.xml)
20# for wayland-extra-protocols.hpp 13# for wayland-extra-protocols.hpp
21include_directories("${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}") 14include_directories("${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}")