mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 02:36:51 -07:00
parent
57418e5e33
commit
c9401aa4b2
6 changed files with 85 additions and 3 deletions
41
scripts/build-sdl2.sh
Executable file
41
scripts/build-sdl2.sh
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd $(dirname "${BASH_SOURCE[0]}")/..
|
||||
ROOT="`pwd`"
|
||||
|
||||
URL=https://www.libsdl.org/release/SDL2-2.0.10.tar.gz
|
||||
FILE=SDL2-2.0.10.tar.gz
|
||||
DIR=SDL2-2.0.10
|
||||
|
||||
if [ ! -d "$DIR" ]; then
|
||||
wget "$URL" || exit 1
|
||||
tar -xf "$FILE" || exit 1
|
||||
fi
|
||||
|
||||
cd "$DIR" || exit 1
|
||||
|
||||
mkdir -p build && cd build || exit 1
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX="$ROOT/sdl2-prefix" \
|
||||
-DSDL_ATOMIC=OFF \
|
||||
-DSDL_AUDIO=OFF \
|
||||
-DSDL_CPUINFO=OFF \
|
||||
-DSDL_EVENTS=ON \
|
||||
-DSDL_FILE=OFF \
|
||||
-DSDL_FILESYSTEM=OFF \
|
||||
-DSDL_HAPTIC=ON \
|
||||
-DSDL_JOYSTICK=ON \
|
||||
-DSDL_LOADSO=OFF \
|
||||
-DSDL_RENDER=OFF \
|
||||
-DSDL_SHARED=ON \
|
||||
-DSDL_STATIC=OFF \
|
||||
-DSDL_TEST=OFF \
|
||||
-DSDL_THREADS=ON \
|
||||
-DSDL_TIMERS=OFF \
|
||||
-DSDL_VIDEO=OFF \
|
||||
.. || exit 1
|
||||
# SDL_THREADS is not needed, but it doesn't compile without
|
||||
|
||||
make -j4 || exit 1
|
||||
make install || exit 1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue