Skip to content

Commit

Permalink
Update Lua and SDL2
Browse files Browse the repository at this point in the history
- Update Lua to 5.4.7
- Update SDL2 to 2.30.4
- Fix SDL2 debug library name on Windows
- Remove MinGW patch for SDL2
  • Loading branch information
encelo committed Jun 30, 2024
1 parent d45e3dd commit 4723424
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 44 deletions.
4 changes: 2 additions & 2 deletions cmake/lua.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(TARGET_LUA lua)
set(URL_LUA https://www.lua.org/ftp/lua-5.4.6.tar.gz)
set(URL_MD5_LUA 25a429319dff20dfbfb9956c2b5be911)
set(URL_LUA https://www.lua.org/ftp/lua-5.4.7.tar.gz)
set(URL_MD5_LUA fc3f3291353bbe6ee6dec85ee61331e8)
set(LIBNAME_LUA lua)
set(PROJECT_SRC_LUA ${EP_BASE}/Source/project_${TARGET_LUA})
set(PROJECT_BUILD_LUA ${EP_BASE}/Build/project_${TARGET_LUA})
Expand Down
14 changes: 7 additions & 7 deletions cmake/sdl2.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
set(TARGET_SDL2 sdl2)
set(URL_SDL2 https://www.libsdl.org/release/SDL2-2.30.0.tar.gz)
set(URL_MD5_SDL2 3b0a35e1d794382dcd64d9da93870ea1)
set(URL_SDL2 https://www.libsdl.org/release/SDL2-2.30.4.tar.gz)
set(URL_MD5_SDL2 89166c920ab657476bf80f6112cd7028)
set(LIBNAME_SDL2 SDL2)
set(LIBNAME_SDL2MAIN SDL2main)

if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(LIBNAME_SDL2 SDL2d)
set(LIBNAME_SDL2MAIN SDL2maind)
endif()

if(MSVC_IDE)
set(LIBFILE_SDL2_DLL ${CMAKE_BUILD_TYPE}/${LIBNAME_SDL2}.dll)
set(LIBFILE_SDL2_IMPLIB ${CMAKE_BUILD_TYPE}/${LIBNAME_SDL2}.lib)
Expand Down Expand Up @@ -66,14 +71,9 @@ elseif(APPLE)
COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Resources ${FRAMEWORK_DIR_SDL2}/Resources
)
elseif(NOT EMSCRIPTEN)
if(MINGW)
set(MINGW_PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/patches/sdl2_mingw.patch)
endif()

ExternalProject_Add(project_${TARGET_SDL2}
URL ${URL_SDL2}
URL_MD5 ${URL_MD5_SDL2}
PATCH_COMMAND ${MINGW_PATCH_COMMAND}
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${DESTINATION_PATH}
BUILD_COMMAND ${CMAKE_COMMAND} --build . --parallel
BUILD_IN_SOURCE 0
Expand Down
35 changes: 0 additions & 35 deletions patches/sdl2_mingw.patch

This file was deleted.

0 comments on commit 4723424

Please sign in to comment.