forked from infernode-os/infernode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-sdl3.sh
More file actions
executable file
·38 lines (31 loc) · 947 Bytes
/
install-sdl3.sh
File metadata and controls
executable file
·38 lines (31 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#
# Install SDL3 from source for Linux
# Requires: sudo, cmake, ninja-build, git
#
set -e
echo "=== Installing SDL3 build dependencies ==="
sudo apt-get install -y cmake ninja-build git \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev \
libwayland-dev libxkbcommon-dev libegl-dev libgles-dev \
libxtst-dev libdrm-dev libgbm-dev
echo ""
echo "=== Building SDL3 from source ==="
BUILDDIR="/tmp/sdl3-build-$$"
mkdir -p "$BUILDDIR"
cd "$BUILDDIR"
git clone --depth 1 https://github.com/libsdl-org/SDL.git
cd SDL
cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
ninja -C build
echo ""
echo "=== Installing SDL3 ==="
sudo ninja -C build install
sudo ldconfig
echo ""
echo "=== Verifying ==="
pkg-config --modversion sdl3 && echo "SDL3 installed successfully" || echo "WARNING: pkg-config can't find sdl3"
# Cleanup
rm -rf "$BUILDDIR"
echo ""
echo "Done. Now run: ./build-linux-amd64.sh"