diff --git a/Sources.cmake b/Sources.cmake index d1a8daf..6be89f7 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.0.18) +set(SDL_VERSION 2.0.20) set(SDL_URL https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz) -set(SDL_MD5 c1dd33299db5b7091f37d989c68d5212) +set(SDL_MD5 a53acc02e1cca98c4123229069b67c9e) 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/0002-Never-build-and-install-SDL2main-library.patch b/patches/sdl/0002-Never-build-and-install-SDL2main-library.patch index 7699de4..8a71f4f 100644 --- a/patches/sdl/0002-Never-build-and-install-SDL2main-library.patch +++ b/patches/sdl/0002-Never-build-and-install-SDL2main-library.patch @@ -8,10 +8,10 @@ Subject: [PATCH] Never build and install SDL2main library 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index d8209ca..b0a24bc 100644 +index f951d0e..81257e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -2670,18 +2670,18 @@ endif() +@@ -2747,17 +2747,17 @@ endif() # Ensure that the extra cflags are used at compile time set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") @@ -22,7 +22,6 @@ index d8209ca..b0a24bc 100644 - add_library(SDL2::SDL2main ALIAS SDL2main) - target_include_directories(SDL2main BEFORE PRIVATE "${SDL2_BINARY_DIR}/include") - target_include_directories(SDL2main PUBLIC "$" $ $) -- set(_INSTALL_LIBS "SDL2main") - if (NOT ANDROID) - set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}") - endif() @@ -34,7 +33,6 @@ index d8209ca..b0a24bc 100644 +# add_library(SDL2::SDL2main ALIAS SDL2main) +# target_include_directories(SDL2main BEFORE PRIVATE "${SDL2_BINARY_DIR}/include") +# target_include_directories(SDL2main PUBLIC "$" $ $) -+# set(_INSTALL_LIBS "SDL2main") +# if (NOT ANDROID) +# set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}") +# endif() @@ -42,6 +40,46 @@ index d8209ca..b0a24bc 100644 if(ANDROID) target_include_directories(sdl-build-options INTERFACE "${ANDROID_NDK}/sources/android/cpufeatures") +@@ -2858,12 +2858,12 @@ if(SDL_SHARED) + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + endif() + +-if(NOT WINDOWS_STORE) +- install(TARGETS SDL2main EXPORT SDL2mainTargets +- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") +-endif() ++#if(NOT WINDOWS_STORE) ++# install(TARGETS SDL2main EXPORT SDL2mainTargets ++# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++# ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++# RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++#endif() + + if(SDL_STATIC) + install(TARGETS SDL2-static EXPORT SDL2staticTargets +@@ -2893,13 +2893,13 @@ if(SDL_SHARED) + ) + endif() + +-if(NOT WINDOWS_STORE) +- install(EXPORT SDL2mainTargets +- FILE SDL2mainTargets.cmake +- NAMESPACE SDL2:: +- DESTINATION ${PKG_PREFIX} +- ) +-endif() ++#if(NOT WINDOWS_STORE) ++# install(EXPORT SDL2mainTargets ++# FILE SDL2mainTargets.cmake ++# NAMESPACE SDL2:: ++# DESTINATION ${PKG_PREFIX} ++# ) ++#endif() + + if(SDL_STATIC) + install(EXPORT SDL2staticTargets -- 2.14.3 diff --git a/patches/sdl/0003-CMake-Use-PUBLIC_HEADER-property-to-install-headers.patch b/patches/sdl/0003-CMake-Use-PUBLIC_HEADER-property-to-install-headers.patch index 5dd2e9e..8e84cd4 100644 --- a/patches/sdl/0003-CMake-Use-PUBLIC_HEADER-property-to-install-headers.patch +++ b/patches/sdl/0003-CMake-Use-PUBLIC_HEADER-property-to-install-headers.patch @@ -59,16 +59,16 @@ index b0a24bc..6a74f12 100644 if (NOT SDL_SHARED OR NOT WIN32 OR MINGW) set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2") # Note: Apparently, OUTPUT_NAME must really be unique; even when -@@ -2780,7 +2789,8 @@ endif() - install(TARGETS ${_INSTALL_LIBS} EXPORT SDL2Targets - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") -+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -+ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/SDL2") +@@ -2855,7 +2855,8 @@ endif() + install(TARGETS SDL2 EXPORT SDL2Targets + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/SDL2") + endif() - ##### Export files ##### - if (WINDOWS AND NOT MINGW) + #if(NOT WINDOWS_STORE) @@ -2808,15 +2818,6 @@ install( COMPONENT Devel ) diff --git a/patches/sdl/0004-CMake-Add-MacOSX-Framework-support.patch b/patches/sdl/0004-CMake-Add-MacOSX-Framework-support.patch index 8d06e1e..eb05360 100644 --- a/patches/sdl/0004-CMake-Add-MacOSX-Framework-support.patch +++ b/patches/sdl/0004-CMake-Add-MacOSX-Framework-support.patch @@ -22,9 +22,9 @@ index ec2cdd4..c3185d3 100644 set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared version of the library") set(SDL_STATIC ${SDL_STATIC_ENABLED_BY_DEFAULT} CACHE BOOL "Build a static version of the library") @@ -2731,6 +2734,16 @@ if(SDL_SHARED) + endif() set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB") endif() - set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS}) + if(APPLE AND BUILD_FRAMEWORK) + set_target_properties(SDL2 PROPERTIES + FRAMEWORK TRUE diff --git a/patches/sdl/0005-CMake-Set-framework-install-directory.patch b/patches/sdl/0005-CMake-Set-framework-install-directory.patch index 929463c..a97586e 100644 --- a/patches/sdl/0005-CMake-Set-framework-install-directory.patch +++ b/patches/sdl/0005-CMake-Set-framework-install-directory.patch @@ -11,14 +11,14 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index f32165cb7..50446f868 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -2686,6 +2686,7 @@ install(TARGETS ${_INSTALL_LIBS} EXPORT SDL2Targets - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -+ FRAMEWORK DESTINATION "${CMAKE_INSTALL_PREFIX}" - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/SDL2") +@@ -2878,6 +2878,7 @@ install(TARGETS ${_INSTALL_LIBS} EXPORT SDL2Targets + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ FRAMEWORK DESTINATION "${CMAKE_INSTALL_PREFIX}" + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/SDL2") + endif() - ##### Export files ##### -- 2.14.3