summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormooff <[email protected]>2024-02-22 22:05:41 +0000
committerGitHub <[email protected]>2024-02-22 23:05:41 +0100
commit4f283a0789b896f4b71ec1cffca959dd0902a5e1 (patch)
tree4502aba833292cc2416a8388e7ba505d384d6820
parent54e0af40c1c534b3f3958264c67270434183639e (diff)
downloadraylib-4f283a0789b896f4b71ec1cffca959dd0902a5e1.tar.gz
raylib-4f283a0789b896f4b71ec1cffca959dd0902a5e1.zip
Add CMake PLATFORM option for Desktop SDL (#3809)
-rw-r--r--CMakeOptions.txt2
-rw-r--r--cmake/LibraryConfigurations.cmake5
2 files changed, 6 insertions, 1 deletions
diff --git a/CMakeOptions.txt b/CMakeOptions.txt
index db0a1a10..68468c07 100644
--- a/CMakeOptions.txt
+++ b/CMakeOptions.txt
@@ -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?")
diff --git a/cmake/LibraryConfigurations.cmake b/cmake/LibraryConfigurations.cmake
index d4bf45a0..18b4f196 100644
--- a/cmake/LibraryConfigurations.cmake
+++ b/cmake/LibraryConfigurations.cmake
@@ -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")