all variants (windows/linux)(static/dynamic) now work
This commit is contained in:
@@ -39,6 +39,32 @@ build_sdl() {
|
||||
echo "=== Done: $OUT_DIR ==="
|
||||
}
|
||||
|
||||
create_dynamic_symlinks() {
|
||||
local LIB_DIR="$PREBUILT_DIR/SDL3-dynamic/lib"
|
||||
|
||||
local REAL_FILE
|
||||
REAL_FILE="$(find "$LIB_DIR" -maxdepth 1 -name 'libSDL3.so.*.*' | head -1)"
|
||||
|
||||
if [ -z "$REAL_FILE" ]; then
|
||||
echo "ERROR: No versioned libSDL3.so file found in $LIB_DIR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local REAL_NAME
|
||||
REAL_NAME="$(basename "$REAL_FILE")"
|
||||
local SONAME="${REAL_NAME%.*}"
|
||||
|
||||
echo ""
|
||||
echo "=== Creating SDL3 symlinks in $LIB_DIR ==="
|
||||
echo " $SONAME -> $REAL_NAME"
|
||||
echo " libSDL3.so -> $SONAME"
|
||||
|
||||
ln -sf "$REAL_NAME" "$LIB_DIR/$SONAME"
|
||||
ln -sf "$SONAME" "$LIB_DIR/libSDL3.so"
|
||||
|
||||
echo "=== Done ==="
|
||||
}
|
||||
|
||||
# Install build dependencies if needed (Debian 12 bookworm)
|
||||
echo "Checking build dependencies..."
|
||||
sudo apt-get update -qq
|
||||
@@ -50,4 +76,9 @@ sudo apt-get install -y --no-install-recommends \
|
||||
libgl1-mesa-dev
|
||||
|
||||
build_sdl "dynamic"
|
||||
build_sdl "static"
|
||||
build_sdl "static"
|
||||
|
||||
# Always recreate symlinks regardless of whether the build was a no-op.
|
||||
# cmake --install does not preserve symlinks and Ninja may skip the build
|
||||
# entirely if sources are unchanged, leaving the lib directory without them.
|
||||
create_dynamic_symlinks
|
||||
Reference in New Issue
Block a user