From 04d3ad4218c439d1d7a78906da759ad9b6be58cf Mon Sep 17 00:00:00 2001 From: Gregor Parzefall Date: Mon, 25 Mar 2024 17:44:20 +0100 Subject: [PATCH] Compile SDL2 --- scripts/SDL2.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scripts/SDL2.sh diff --git a/scripts/SDL2.sh b/scripts/SDL2.sh new file mode 100644 index 0000000..ddc581c --- /dev/null +++ b/scripts/SDL2.sh @@ -0,0 +1,17 @@ +#!/bin/bash -e +ver=2.30.1 + +download () { + get_tar_archive sdl2 "https://github.com/libsdl-org/SDL/releases/download/release-${ver}/SDL2-${ver}.tar.gz" +} + +build () { + cmake $srcdir/sdl2 "${CMAKE_FLAGS[@]}" \ + -DSDL_SHARED=OFF \ + -DSDL_STATIC=ON \ + -DSDL_TEST=OFF \ + -DSDL2_DISABLE_SDL2MAIN=ON + make + + make_install_copy +}