Add SDL3 backend

This commit is contained in:
Anonymous Maarten
2025-09-04 17:38:12 +02:00
parent 4495762b13
commit 6a1ec78cfb
13 changed files with 685 additions and 27 deletions

View File

@@ -14,16 +14,21 @@ if(LIBRW_PLATFORM_GL3)
message(FATAL_ERROR "find_package(OpenGL) failed: no target was created")
endif()
include(CMakeFindDependencyMacro)
if(LIBRW_GL3_GFXLIB STREQUAL "GLFW")
if (NOT TARGET glfw)
find_package(glfw3 REQUIRED)
find_dependency(glfw3 REQUIRED)
endif()
elseif(LIBRW_GL3_GFXLIB STREQUAL "SDL2")
if (NOT TARGET SDL2::SDL2)
find_package(SDL2 CONFIG)
find_dependency(SDL2 CONFIG)
if (NOT TARGET SDL2::SDL2)
find_package(SDL2 MODULE REQUIRED)
find_dependency(SDL2 MODULE REQUIRED)
endif()
endif()
elseif(LIBRW_GL3_GFXLIB STREQUAL "SDL3")
if (NOT TARGET SDL3::SDL3)
find_dependency(SDL3 CONFIG REQUIRED)
endif()
endif()
endif()