mirror of https://github.com/ppy/SDL3-CS.git
Refactor build script and build satellite libraries for Android
This commit is contained in:
parent
d920afefe2
commit
71611c90ab
|
|
@ -5,6 +5,8 @@ on:
|
||||||
# - cron: '0 0 * * *'
|
# - cron: '0 0 * * *'
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Release
|
||||||
|
NDK_VER: 27.2.12479018
|
||||||
|
PLATFORM_VER: 35
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -24,11 +26,32 @@ jobs:
|
||||||
- { name: osx-x64, os: macos-13, flags: -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 }
|
- { name: osx-x64, os: macos-13, flags: -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 }
|
||||||
# NOTE: macOS 11.0 is the first released supported by Apple Silicon.
|
# NOTE: macOS 11.0 is the first released supported by Apple Silicon.
|
||||||
- { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 }
|
- { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 }
|
||||||
|
- { name: android-arm64, os: ubuntu-22.04, flags: -GNinja, abi: arm64-v8a }
|
||||||
|
- { name: android-arm, os: ubuntu-22.04, flags: -GNinja, abi: armeabi-v7a }
|
||||||
|
- { name: android-x64, os: ubuntu-22.04, flags: -GNinja, abi: x86_64 }
|
||||||
|
- { name: android-x86, os: ubuntu-22.04, flags: -GNinja, abi: x86 }
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Setup JDK
|
||||||
|
if: contains(matrix.platform.name, 'android')
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: microsoft
|
||||||
|
java-version: 17
|
||||||
|
|
||||||
|
- name: Install Android SDK Manager
|
||||||
|
if: contains(matrix.platform.name, 'android')
|
||||||
|
uses: android-actions/setup-android@v3
|
||||||
|
|
||||||
|
- name: Install Android SDK
|
||||||
|
if: contains(matrix.platform.name, 'android')
|
||||||
|
run: |
|
||||||
|
sdkmanager --install "platforms;android-$PLATFORM_VER"
|
||||||
|
sdkmanager --install "ndk;$NDK_VER"
|
||||||
|
|
||||||
- name: Build (Linux ARM)
|
- name: Build (Linux ARM)
|
||||||
if: contains(matrix.platform.container, 'arm')
|
if: contains(matrix.platform.container, 'arm')
|
||||||
uses: addnab/docker-run-action@v3
|
uses: addnab/docker-run-action@v3
|
||||||
|
|
@ -52,6 +75,7 @@ jobs:
|
||||||
TARGET_APT_ARCH: ${{ matrix.platform.target_apt_arch }}
|
TARGET_APT_ARCH: ${{ matrix.platform.target_apt_arch }}
|
||||||
RUNNER_OS: ${{ runner.os }}
|
RUNNER_OS: ${{ runner.os }}
|
||||||
FLAGS: ${{ matrix.platform.flags }}
|
FLAGS: ${{ matrix.platform.flags }}
|
||||||
|
ANDROID_ABI: ${{ matrix.platform.abi }}
|
||||||
run: ./External/build.sh
|
run: ./External/build.sh
|
||||||
|
|
||||||
- name: Get Actions user id
|
- name: Get Actions user id
|
||||||
|
|
@ -66,7 +90,12 @@ jobs:
|
||||||
user_id: ${{ steps.get_uid.outputs.uid }}
|
user_id: ${{ steps.get_uid.outputs.uid }}
|
||||||
|
|
||||||
- name: Compress native directory
|
- name: Compress native directory
|
||||||
run: tar -cf native-${{ matrix.platform.name }}.tar native/${{ matrix.platform.name }}
|
if: ${{ !contains(matrix.platform.name, 'android') }}
|
||||||
|
run: tar -cvf native-${{ matrix.platform.name }}.tar native/${{ matrix.platform.name }}
|
||||||
|
|
||||||
|
- name: Compress native directory (Android)
|
||||||
|
if: contains(matrix.platform.name, 'android')
|
||||||
|
run: tar -cvf native-${{ matrix.platform.name }}.tar native/android/${{ matrix.platform.abi }}
|
||||||
|
|
||||||
- name: Upload native artifact
|
- name: Upload native artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
@ -100,7 +129,7 @@ jobs:
|
||||||
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist;
|
cp External/SDL/Xcode/SDL/build/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist native/ios/SDL3.xcframework/ios-arm64_x86_64-simulator/SDL3.framework/Info.plist;
|
||||||
|
|
||||||
- name: Compress native directory
|
- name: Compress native directory
|
||||||
run: tar -cf native-ios.tar native/ios
|
run: tar -cvf native-ios.tar native/ios
|
||||||
|
|
||||||
- name: Upload native artifact
|
- name: Upload native artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
@ -109,12 +138,9 @@ jobs:
|
||||||
path: native-ios.tar
|
path: native-ios.tar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-android:
|
build-android-jar:
|
||||||
name: android
|
name: android-jar
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
env:
|
|
||||||
NDK_VER: 23.1.7779620
|
|
||||||
PLATFORM_VER: android-34
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -130,22 +156,10 @@ jobs:
|
||||||
|
|
||||||
- name: Install Android SDK Manager
|
- name: Install Android SDK Manager
|
||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
with:
|
|
||||||
packages: ''
|
|
||||||
|
|
||||||
- name: Install Android SDK
|
- name: Install Android SDK
|
||||||
run: |
|
run: |
|
||||||
sdkmanager --install "platform-tools" "platforms;$PLATFORM_VER"
|
sdkmanager --install "platforms;android-$PLATFORM_VER"
|
||||||
sdkmanager --install "ndk;$NDK_VER" --channel=3
|
|
||||||
|
|
||||||
- name: Build (Android)
|
|
||||||
run: |
|
|
||||||
export PATH=$ANDROID_HOME/ndk/$NDK_VER:$PATH
|
|
||||||
export OUTPUT=$PWD/native/android
|
|
||||||
rm -rf $OUTPUT && mkdir -p $OUTPUT
|
|
||||||
|
|
||||||
# Build SDL3
|
|
||||||
./External/SDL/build-scripts/androidbuildlibs.sh APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" NDK_LIBS_OUT="$OUTPUT"
|
|
||||||
|
|
||||||
- name: Build SDL3 Android Java
|
- name: Build SDL3 Android Java
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -156,19 +170,9 @@ jobs:
|
||||||
|
|
||||||
# Build SDL3 Android Java part
|
# Build SDL3 Android Java part
|
||||||
cd ./External/SDL/android-project/app/src/main/java
|
cd ./External/SDL/android-project/app/src/main/java
|
||||||
javac -cp $ANDROID_HOME/platforms/$PLATFORM_VER/android.jar -encoding utf8 org/libsdl/app/*.java
|
javac -cp $ANDROID_HOME/platforms/android-$PLATFORM_VER/android.jar -encoding utf8 org/libsdl/app/*.java
|
||||||
jar cvf $OUTPUT/SDL3AndroidBridge.jar org/libsdl/app/*.class
|
jar cvf $OUTPUT/SDL3AndroidBridge.jar org/libsdl/app/*.class
|
||||||
|
|
||||||
- name: Compress native directory
|
|
||||||
run: tar -cf native-android.tar native/android
|
|
||||||
|
|
||||||
- name: Upload native artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: native-android
|
|
||||||
path: native-android.tar
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
- name: Upload JAR artifact
|
- name: Upload JAR artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -179,7 +183,7 @@ jobs:
|
||||||
make-pr:
|
make-pr:
|
||||||
name: Submit pull request
|
name: Submit pull request
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build, build-ios, build-android ]
|
needs: [ build, build-ios, build-android-jar ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -338,3 +338,5 @@ inspectcodereport.xml
|
||||||
inspectcode
|
inspectcode
|
||||||
|
|
||||||
sdl.json
|
sdl.json
|
||||||
|
|
||||||
|
install_output/
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ set -e
|
||||||
pushd "$(dirname "$0")"
|
pushd "$(dirname "$0")"
|
||||||
|
|
||||||
# Check if environment variables are defined
|
# Check if environment variables are defined
|
||||||
if [[ -z $NAME || -z $RUNNER_OS || -z $FLAGS ]]; then
|
if [[ -z $NAME || -z $RUNNER_OS || -z $FLAGS || -z $BUILD_TYPE ]]; then
|
||||||
echo "One or more required environment variables are not defined."
|
echo "One or more required environment variables are not defined."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
@ -16,9 +16,18 @@ else
|
||||||
SUDO=$(which sudo || exit 0)
|
SUDO=$(which sudo || exit 0)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n $ANDROID_ABI ]]; then
|
||||||
|
BUILD_PLATFORM="Android"
|
||||||
|
else
|
||||||
|
BUILD_PLATFORM="$RUNNER_OS"
|
||||||
|
fi
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
if [[ $RUNNER_OS == 'Linux' ]]; then
|
if [[ $BUILD_PLATFORM != 'Android' ]]; then
|
||||||
|
NATIVE_PATH="$NAME"
|
||||||
|
|
||||||
|
if [[ $BUILD_PLATFORM == 'Linux' ]]; then
|
||||||
# Setup Linux dependencies
|
# Setup Linux dependencies
|
||||||
if [[ $TARGET_APT_ARCH == :i386 ]]; then
|
if [[ $TARGET_APT_ARCH == :i386 ]]; then
|
||||||
$SUDO dpkg --add-architecture i386
|
$SUDO dpkg --add-architecture i386
|
||||||
|
|
@ -73,96 +82,97 @@ if [[ $RUNNER_OS == 'Linux' ]]; then
|
||||||
libpulse-dev$TARGET_APT_ARCH \
|
libpulse-dev$TARGET_APT_ARCH \
|
||||||
libpipewire-0.3-dev$TARGET_APT_ARCH \
|
libpipewire-0.3-dev$TARGET_APT_ARCH \
|
||||||
libdecor-0-dev$TARGET_APT_ARCH
|
libdecor-0-dev$TARGET_APT_ARCH
|
||||||
|
fi
|
||||||
git config --global --add safe.directory /workspace/External/SDL
|
else
|
||||||
git config --global --add safe.directory /workspace/External/SDL_image
|
if [[ -z $ANDROID_HOME || -z $NDK_VER || -z $PLATFORM_VER || -z $ANDROID_ABI ]]; then
|
||||||
git config --global --add safe.directory /workspace/External/SDL_ttf
|
echo "One or more required environment variables are not defined."
|
||||||
git config --global --add safe.directory /workspace/External/SDL_mixer
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build SDL
|
NATIVE_PATH="android/$ANDROID_ABI"
|
||||||
pushd SDL
|
|
||||||
|
export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/$NDK_VER"
|
||||||
|
export FLAGS="$FLAGS -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
|
||||||
|
-DANDROID_HOME=$ANDROID_HOME \
|
||||||
|
-DANDROID_PLATFORM=$PLATFORM_VER \
|
||||||
|
-DANDROID_ABI=$ANDROID_ABI \
|
||||||
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
|
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH \
|
||||||
|
-DCMAKE_INSTALL_INCLUDEDIR=include \
|
||||||
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||||
|
-DCMAKE_INSTALL_DATAROOTDIR=share \
|
||||||
|
-DSDL_ANDROID_JAR=OFF"
|
||||||
|
|
||||||
|
$SUDO apt-get install -y \
|
||||||
|
git \
|
||||||
|
cmake \
|
||||||
|
ninja-build \
|
||||||
|
meson
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $RUNNER_OS == 'Linux' ]]; then
|
||||||
|
git config --global --add safe.directory $PWD/SDL
|
||||||
|
git config --global --add safe.directory $PWD/SDL_image
|
||||||
|
git config --global --add safe.directory $PWD/SDL_ttf
|
||||||
|
git config --global --add safe.directory $PWD/SDL_mixer
|
||||||
|
fi
|
||||||
|
|
||||||
|
CMAKE_INSTALL_PREFIX="$PWD/install_output"
|
||||||
|
rm -rf $CMAKE_INSTALL_PREFIX
|
||||||
|
|
||||||
|
if [[ $BUILD_PLATFORM == 'Android' ]]; then
|
||||||
|
OUTPUT_LIB="lib/libSDL3variant.so"
|
||||||
|
elif [[ $BUILD_PLATFORM == 'Windows' ]]; then
|
||||||
|
OUTPUT_LIB="bin/SDL3variant.dll"
|
||||||
|
elif [[ $BUILD_PLATFORM == 'Linux' ]]; then
|
||||||
|
OUTPUT_LIB="lib/libSDL3variant.so"
|
||||||
|
elif [[ $BUILD_PLATFORM == 'macOS' ]]; then
|
||||||
|
OUTPUT_LIB="lib/libSDL3variant.dylib"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use the correct CMAKE_PREFIX_PATH for SDL_image and SDL_ttf, probably due differences in Cmake versions.
|
||||||
|
if [[ $BUILD_PLATFORM == 'Android' ]]; then
|
||||||
|
CMAKE_PREFIX_PATH="$CMAKE_INSTALL_PREFIX"
|
||||||
|
elif [[ $BUILD_PLATFORM == 'Windows' ]]; then
|
||||||
|
CMAKE_PREFIX_PATH="$CMAKE_INSTALL_PREFIX/cmake/"
|
||||||
|
elif [[ $BUILD_PLATFORM == 'Linux' ]]; then
|
||||||
|
CMAKE_PREFIX_PATH="$CMAKE_INSTALL_PREFIX/lib/cmake/"
|
||||||
|
elif [[ $BUILD_PLATFORM == 'macOS' ]]; then
|
||||||
|
CMAKE_PREFIX_PATH="$CMAKE_INSTALL_PREFIX/lib/cmake/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
run_cmake() {
|
||||||
|
LIB_NAME=$1
|
||||||
|
LIB_OUTPUT=$2
|
||||||
|
|
||||||
|
pushd $LIB_NAME
|
||||||
|
|
||||||
git reset --hard HEAD || echo "Failed to clean up the repository"
|
git reset --hard HEAD || echo "Failed to clean up the repository"
|
||||||
|
|
||||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
if [[ $BUILD_PLATFORM == 'Windows' && $LIB_NAME == 'SDL' ]]; then
|
||||||
echo "Patching SDL to not include gameinput.h"
|
echo "Patching SDL to not include gameinput.h"
|
||||||
sed -i 's/#include <gameinput.h>/#_include <gameinput.h>/g' CMakeLists.txt
|
sed -i 's/#include <gameinput.h>/#_include <gameinput.h>/g' CMakeLists.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON
|
rm -rf build
|
||||||
cmake --build build/ --config Release
|
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED=ON -DSDL_STATIC=OFF "${@:3}"
|
||||||
$SUDO cmake --install build/ --prefix install_output --config Release
|
cmake --build build/ --config $BUILD_TYPE --verbose
|
||||||
popd
|
cmake --install build/ --prefix $CMAKE_INSTALL_PREFIX --config $BUILD_TYPE
|
||||||
|
|
||||||
# Move build lib into correct folders
|
# Move build lib into correct folders
|
||||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
cp $CMAKE_INSTALL_PREFIX/$LIB_OUTPUT ../../native/$NATIVE_PATH
|
||||||
cp SDL/install_output/bin/SDL3.dll ../native/$NAME/SDL3.dll
|
|
||||||
elif [[ $RUNNER_OS == 'Linux' ]]; then
|
|
||||||
cp SDL/install_output/lib/libSDL3.so ../native/$NAME/libSDL3.so
|
|
||||||
elif [[ $RUNNER_OS == 'macOS' ]]; then
|
|
||||||
cp SDL/install_output/lib/libSDL3.dylib ../native/$NAME/libSDL3.dylib
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use the correct CMAKE_PREFIX_PATH for SDL_image and SDL_ttf, probably due differences in Cmake versions
|
popd
|
||||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
}
|
||||||
CMAKE_PREFIX_PATH="../SDL/install_output/cmake/"
|
|
||||||
elif [[ $RUNNER_OS == 'Linux' ]]; then
|
run_cmake SDL ${OUTPUT_LIB/variant/}
|
||||||
CMAKE_PREFIX_PATH="../SDL/install_output/lib/cmake/"
|
|
||||||
elif [[ $RUNNER_OS == 'macOS' ]]; then
|
run_cmake SDL_ttf ${OUTPUT_LIB/variant/_ttf} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DSDLTTF_VENDORED=ON
|
||||||
CMAKE_PREFIX_PATH="../SDL/install_output/lib/cmake/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build SDL_image
|
|
||||||
pushd SDL_image
|
|
||||||
git reset --hard HEAD
|
|
||||||
# -DSDLIMAGE_AVIF=OFF is used because windows requires special setup to build avif support (nasm)
|
# -DSDLIMAGE_AVIF=OFF is used because windows requires special setup to build avif support (nasm)
|
||||||
# TODO: Add support for avif on windows (VisualC script uses dynamic imports)
|
# TODO: Add support for avif on windows (VisualC script uses dynamic imports)
|
||||||
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLIMAGE_AVIF=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_VENDORED=ON
|
run_cmake SDL_image ${OUTPUT_LIB/variant/_image} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLIMAGE_AVIF=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_VENDORED=ON
|
||||||
cmake --build build/ --config Release
|
|
||||||
$SUDO cmake --install build/ --prefix install_output --config Release
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Move build lib into correct folders
|
run_cmake SDL_mixer ${OUTPUT_LIB/variant/_mixer} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLMIXER_DEPS_SHARED=OFF -DSDLMIXER_VENDORED=ON
|
||||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
|
||||||
cp SDL_image/install_output/bin/SDL3_image.dll ../native/$NAME/SDL3_image.dll
|
|
||||||
elif [[ $RUNNER_OS == 'Linux' ]]; then
|
|
||||||
cp SDL_image/install_output/lib/libSDL3_image.so ../native/$NAME/libSDL3_image.so
|
|
||||||
elif [[ $RUNNER_OS == 'macOS' ]]; then
|
|
||||||
cp SDL_image/install_output/lib/libSDL3_image.dylib ../native/$NAME/libSDL3_image.dylib
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build SDL_ttf
|
|
||||||
pushd SDL_ttf
|
|
||||||
git reset --hard HEAD
|
|
||||||
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DSDLTTF_VENDORED=ON
|
|
||||||
cmake --build build/ --config Release
|
|
||||||
$SUDO cmake --install build/ --prefix install_output --config Release
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Move build lib into correct folders
|
|
||||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
|
||||||
cp SDL_ttf/install_output/bin/SDL3_ttf.dll ../native/$NAME/SDL3_ttf.dll
|
|
||||||
elif [[ $RUNNER_OS == 'Linux' ]]; then
|
|
||||||
cp SDL_ttf/install_output/lib/libSDL3_ttf.so ../native/$NAME/libSDL3_ttf.so
|
|
||||||
elif [[ $RUNNER_OS == 'macOS' ]]; then
|
|
||||||
cp SDL_ttf/install_output/lib/libSDL3_ttf.dylib ../native/$NAME/libSDL3_ttf.dylib
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build SDL_mixer
|
|
||||||
pushd SDL_mixer
|
|
||||||
git reset --hard HEAD
|
|
||||||
cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLMIXER_VENDORED=ON
|
|
||||||
cmake --build build/ --config Release
|
|
||||||
$SUDO cmake --install build/ --prefix install_output --config Release
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Move build lib into correct folders
|
|
||||||
if [[ $RUNNER_OS == 'Windows' ]]; then
|
|
||||||
cp SDL_mixer/install_output/bin/SDL3_mixer.dll ../native/$NAME/SDL3_mixer.dll
|
|
||||||
elif [[ $RUNNER_OS == 'Linux' ]]; then
|
|
||||||
cp SDL_mixer/install_output/lib/libSDL3_mixer.so ../native/$NAME/libSDL3_mixer.so
|
|
||||||
elif [[ $RUNNER_OS == 'macOS' ]]; then
|
|
||||||
cp SDL_mixer/install_output/lib/libSDL3_mixer.dylib ../native/$NAME/libSDL3_mixer.dylib
|
|
||||||
fi
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue