aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2020-10-06 09:34:36 -0700
committerLukas Rusak <lorusak@gmail.com>2020-10-27 08:21:36 -0700
commitd159837cf736c9ba17772ba52e4ce95aa3625528 (patch)
tree4c67dd3c1716289b83d8c42645a535172007c357 /cmake
parent1b1881bb5fe13bcc68be5a3bfb76b7e6da62a6fa (diff)
[cmake] only use APP_RENDER_SYSTEM
Diffstat (limited to 'cmake')
-rw-r--r--cmake/platform/freebsd/x11.cmake1
-rw-r--r--cmake/platform/linux/gbm.cmake10
-rw-r--r--cmake/platform/linux/wayland.cmake10
-rw-r--r--cmake/platform/linux/x11.cmake10
-rw-r--r--cmake/scripts/common/Platform.cmake10
5 files changed, 13 insertions, 28 deletions
diff --git a/cmake/platform/freebsd/x11.cmake b/cmake/platform/freebsd/x11.cmake
index f4e5b6deb0..307dac37de 100644
--- a/cmake/platform/freebsd/x11.cmake
+++ b/cmake/platform/freebsd/x11.cmake
@@ -1,3 +1,2 @@
list(APPEND PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM)
list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX)
-set(APP_RENDER_SYSTEM gl)
diff --git a/cmake/platform/linux/gbm.cmake b/cmake/platform/linux/gbm.cmake
index dfbe2525ee..8f17ef672d 100644
--- a/cmake/platform/linux/gbm.cmake
+++ b/cmake/platform/linux/gbm.cmake
@@ -1,14 +1,8 @@
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()
diff --git a/cmake/platform/linux/wayland.cmake b/cmake/platform/linux/wayland.cmake
index 66dd736299..1adcd8fe77 100644
--- a/cmake/platform/linux/wayland.cmake
+++ b/cmake/platform/linux/wayland.cmake
@@ -1,16 +1,10 @@
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)
diff --git a/cmake/platform/linux/x11.cmake b/cmake/platform/linux/x11.cmake
index 1378bbd5b4..5f5b8c2f99 100644
--- a/cmake/platform/linux/x11.cmake
+++ b/cmake/platform/linux/x11.cmake
@@ -1,15 +1,9 @@
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()
diff --git a/cmake/scripts/common/Platform.cmake b/cmake/scripts/common/Platform.cmake
index d3e0892149..b389745d40 100644
--- a/cmake/scripts/common/Platform.cmake
+++ b/cmake/scripts/common/Platform.cmake
@@ -3,10 +3,13 @@ if(NOT CORE_SYSTEM_NAME)
endif()
if(CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd)
- # Set default CORE_PLATFORM_NAME to X11
+ # Set default CORE_PLATFORM_NAME to X11 WAYLAND GBM
# This is overridden by user setting -DCORE_PLATFORM_NAME=<platform>
- set(_DEFAULT_PLATFORM X11)
- option(ENABLE_APP_AUTONAME "Enable renaming the binary according to windowing?" ON)
+ set(_DEFAULT_PLATFORM X11 WAYLAND GBM)
+
+ if(NOT APP_RENDER_SYSTEM)
+ message(SEND_ERROR "You need to decide whether you want to use GL- or GLES-based rendering. Please set APP_RENDER_SYSTEM to either \"gl\" or \"gles\". For normal desktop systems, you will usually want to use \"gl\".")
+ endif()
else()
string(TOLOWER ${CORE_SYSTEM_NAME} _DEFAULT_PLATFORM)
endif()
@@ -34,6 +37,7 @@ list(APPEND final_message "Platforms: ${CORE_PLATFORM_STRING}")
list(LENGTH CORE_PLATFORM_NAME_LC PLATFORM_COUNT)
if(PLATFORM_COUNT EQUAL 1)
+ option(ENABLE_APP_AUTONAME "Enable renaming the binary according to windowing?" ON)
if(ENABLE_APP_AUTONAME)
set(APP_BINARY_SUFFIX "-${CORE_PLATFORM_NAME_LC}")
endif()