Fix SDL3 being used in gen_libs.sh

The SDL default branch is now SDL3, so we need to check out specifically the SDL2 branch.
This commit is contained in:
Robert Müller 2024-05-07 13:12:48 +02:00
parent ad9b44bfed
commit 9afe7444c1

View file

@ -55,7 +55,11 @@ cd "$1" || exit 1
function build_cmake_lib() { function build_cmake_lib() {
if [ ! -d "${1}" ]; then if [ ! -d "${1}" ]; then
if [ -z ${3+x} ]; then
git clone "${2}" "${1}" git clone "${2}" "${1}"
else
git clone --single-branch --branch "${3}" "${2}" "${1}"
fi
fi fi
( (
cd "${1}" || exit 1 cd "${1}" || exit 1
@ -90,7 +94,7 @@ build_cmake_lib zlib https://github.com/madler/zlib
build_cmake_lib png https://github.com/glennrp/libpng build_cmake_lib png https://github.com/glennrp/libpng
build_cmake_lib curl https://github.com/curl/curl build_cmake_lib curl https://github.com/curl/curl
build_cmake_lib freetype2 https://gitlab.freedesktop.org/freetype/freetype build_cmake_lib freetype2 https://gitlab.freedesktop.org/freetype/freetype
build_cmake_lib sdl https://github.com/libsdl-org/SDL build_cmake_lib sdl https://github.com/libsdl-org/SDL SDL2
build_cmake_lib ogg https://github.com/xiph/ogg build_cmake_lib ogg https://github.com/xiph/ogg
build_cmake_lib opus https://github.com/xiph/opus build_cmake_lib opus https://github.com/xiph/opus