From e8636162b172ce7a1e53ed637ab5a53c7781132e Mon Sep 17 00:00:00 2001 From: O01eg Date: Sun, 22 Dec 2024 21:43:14 +0400 Subject: [PATCH] Try to update SDL to 2.26.0 --- Sources.cmake | 4 ++-- ...4-CMake-Add-MacOSX-Framework-support.patch | 20 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Sources.cmake b/Sources.cmake index 5661422..a628b9a 100644 --- a/Sources.cmake +++ b/Sources.cmake @@ -34,9 +34,9 @@ set(FREETYPE_VERSION 2.9) set(FREETYPE_URL http://downloads.sourceforge.net/project/freetype/freetype2/${FREETYPE_VERSION}/freetype-${FREETYPE_VERSION}.tar.gz) set(FREETYPE_MD5 d23a1b246e78890458c6672cb45eacd0) -set(SDL_VERSION 2.24.2) +set(SDL_VERSION 2.26.0) set(SDL_URL https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz) -set(SDL_MD5 84c71cb2a14aa0d9504513c0b9fcb17c) +set(SDL_MD5 35bc58cfe41b8fb6c8e6646be26fa47e) set(LIBOGG_VERSION 1.3.2) set(LIBOGG_URL http://downloads.xiph.org/releases/ogg/libogg-${LIBOGG_VERSION}.tar.gz) diff --git a/patches/sdl/0004-CMake-Add-MacOSX-Framework-support.patch b/patches/sdl/0004-CMake-Add-MacOSX-Framework-support.patch index 528ab96..5f078d4 100644 --- a/patches/sdl/0004-CMake-Add-MacOSX-Framework-support.patch +++ b/patches/sdl/0004-CMake-Add-MacOSX-Framework-support.patch @@ -8,20 +8,20 @@ Subject: [PATCH] CMake: Add MacOSX Framework support 1 file changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 707eb5c..af93a52 100644 +index a596eec..7f6e574 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -505,6 +505,9 @@ dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" O - dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI OFF) - dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF) +@@ -514,6 +514,9 @@ dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_H set_option(SDL_ASAN "Use AddressSanitizer to detect memory errors" OFF) + option_string(SDL_VENDOR_INFO "Vendor name and/or version to add to SDL_REVISION" "") + set_option(SDL_CCACHE "Use Ccache to speed up build" ON) +if(APPLE) + set_option(BUILD_FRAMEWORK "Build Framework bundle for OSX" OFF) +endif() - option(SDL_SHARED "Build a shared version of the library" ${SDL_SHARED_ENABLED_BY_DEFAULT}) - option(SDL_STATIC "Build a static version of the library" ${SDL_STATIC_ENABLED_BY_DEFAULT}) -@@ -3097,6 +3100,16 @@ if(SDL_SHARED) + option(SDL_WERROR "Enable -Werror" OFF) + +@@ -3320,6 +3323,16 @@ if(SDL_SHARED) endif() set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB") endif() @@ -38,10 +38,10 @@ index 707eb5c..af93a52 100644 # FIXME: if CMAKE_VERSION >= 3.13, use target_link_options for EXTRA_LDFLAGS target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${EXTRA_LDFLAGS_BUILD}) target_include_directories(SDL2 PUBLIC -@@ -3288,7 +3301,7 @@ if(NOT SDL2_DISABLE_INSTALL) - set(SOPOSTFIX "") +@@ -3518,7 +3531,7 @@ if(NOT SDL2_DISABLE_INSTALL) + install(FILES ${SDL2_BINARY_DIR}/sdl2.pc + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") endif() - - if(NOT (WINDOWS OR CYGWIN) OR MINGW) + if((NOT (WINDOWS OR CYGWIN) OR MINGW) AND (NOT BUILD_FRAMEWORK)) if(SDL_SHARED)