Add CMake PLATFORM option for Desktop SDL (#3809)
This commit is contained in:
parent
54e0af40c1
commit
4f283a0789
@ -2,7 +2,7 @@
|
|||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
include(EnumOption)
|
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?")
|
enum_option(OPENGL_VERSION "OFF;4.3;3.3;2.1;1.1;ES 2.0;ES 3.0" "Force a specific OpenGL Version?")
|
||||||
|
|
||||||
|
@ -91,6 +91,11 @@ elseif ("${PLATFORM}" MATCHES "DRM")
|
|||||||
endif ()
|
endif ()
|
||||||
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${DRM} ${GBM} atomic pthread m dl)
|
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 ()
|
endif ()
|
||||||
|
|
||||||
if (NOT ${OPENGL_VERSION} MATCHES "OFF")
|
if (NOT ${OPENGL_VERSION} MATCHES "OFF")
|
||||||
|
Loading…
Reference in New Issue
Block a user