Browse Source

Add CMake PLATFORM option for Desktop SDL (#3809)

pull/3817/head
mooff 8 months ago
committed by GitHub
parent
commit
4f283a0789
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions
  1. +1
    -1
      CMakeOptions.txt
  2. +5
    -0
      cmake/LibraryConfigurations.cmake

+ 1
- 1
CMakeOptions.txt View File

@ -2,7 +2,7 @@
include(CMakeDependentOption)
include(EnumOption)
enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM" "Platform to build for.")
enum_option(PLATFORM "Desktop;Web;Android;Raspberry Pi;DRM;SDL" "Platform to build for.")
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0" "Force a specific OpenGL Version?")

+ 5
- 0
cmake/LibraryConfigurations.cmake View File

@ -91,6 +91,11 @@ elseif ("${PLATFORM}" MATCHES "DRM")
endif ()
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread m dl)
elseif ("${PLATFORM}" MATCHES "SDL")
find_package(SDL2 REQUIRED)
set(PLATFORM_CPP "PLATFORM_DESKTOP_SDL")
set(LIBS_PRIVATE SDL2::SDL2)
endif ()
if (NOT ${OPENGL_VERSION} MATCHES "OFF")

Loading…
Cancel
Save