From 996baf680ff857401206c51dfdd42db47f3c4aed Mon Sep 17 00:00:00 2001 From: Bruno Cabral Date: Fri, 12 Sep 2025 07:35:46 -0700 Subject: [PATCH] [build][cmake] prefer USING_VERSION_SDL3 over PLATFORM_DESKTOP_SDL3 --- cmake/LibraryConfigurations.cmake | 4 ++-- src/rcore.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cmake/LibraryConfigurations.cmake b/cmake/LibraryConfigurations.cmake index 688a9fd39..76d390421 100644 --- a/cmake/LibraryConfigurations.cmake +++ b/cmake/LibraryConfigurations.cmake @@ -104,7 +104,7 @@ elseif ("${PLATFORM}" MATCHES "SDL") # First, check if SDL is included as a subdirectory if(TARGET SDL3::SDL3) message(STATUS "Using SDL3 from subdirectory") - set(PLATFORM_CPP "PLATFORM_DESKTOP_SDL3") + set(PLATFORM_CPP "PLATFORM_DESKTOP_SDL") set(LIBS_PRIVATE SDL3::SDL3) add_compile_definitions(USING_SDL3_PROJECT) elseif(TARGET SDL2::SDL2) @@ -120,8 +120,8 @@ elseif ("${PLATFORM}" MATCHES "SDL") find_package(SDL3 QUIET) if(SDL3_FOUND) message(STATUS "Found SDL3 via find_package()") - set(PLATFORM_CPP "PLATFORM_DESKTOP_SDL3") set(LIBS_PRIVATE SDL3::SDL3) + set(PLATFORM_CPP "PLATFORM_DESKTOP_SDL") add_compile_definitions(USING_SDL3_PACKAGE) else() # Fallback to SDL2 diff --git a/src/rcore.c b/src/rcore.c index 54569fea6..3455ff8c3 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -553,8 +553,6 @@ const char *TextFormat(const char *text, ...); // Formatting of text with variab #include "platforms/rcore_desktop_glfw.c" #elif defined(PLATFORM_DESKTOP_SDL) #include "platforms/rcore_desktop_sdl.c" -#elif defined(PLATFORM_DESKTOP_SDL3) - #include "platforms/rcore_desktop_sdl.c" #elif (defined(PLATFORM_DESKTOP_RGFW) || defined(PLATFORM_WEB_RGFW)) #include "platforms/rcore_desktop_rgfw.c" #elif defined(PLATFORM_DESKTOP_WIN32)