mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-23 17:51:31 +00:00
Add mac universal fuse build scripts
This commit is contained in:
parent
aabf8ae54e
commit
8e66ed73ab
3 changed files with 39 additions and 0 deletions
7
scripts/arm64-osx-1015.cmake
Normal file
7
scripts/arm64-osx-1015.cmake
Normal file
|
@ -0,0 +1,7 @@
|
|||
set(VCPKG_TARGET_ARCHITECTURE arm64)
|
||||
set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
|
||||
set(VCPKG_OSX_ARCHITECTURES arm64)
|
25
scripts/make-macos-universal.sh
Executable file
25
scripts/make-macos-universal.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Makes a fused macOS Universal app bundle in the arm64 release preset dir
|
||||
# Only works if in master branch or in source tarball
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf "build/ninja-x64_osx_vcpkg-release"
|
||||
rm -rf "build/ninja-arm64_osx_vcpkg-release"
|
||||
cmake --preset ninja-x64_osx_vcpkg-release -DVCPKG_OVERLAY_TRIPLETS=scripts/ -DVCPKG_TARGET_TRIPLET=x64-osx-1015 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 "-DSRB2_SDL2_EXE_NAME=srb2"
|
||||
cmake --build --preset ninja-x64_osx_vcpkg-release
|
||||
cmake --preset ninja-arm64_osx_vcpkg-release -DVCPKG_OVERLAY_TRIPLETS=scripts/ -DVCPKG_TARGET_TRIPLET=arm64-osx-1015 -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 "-DSRB2_SDL2_EXE_NAME=srb2"
|
||||
cmake --build --preset ninja-arm64_osx_vcpkg-release
|
||||
|
||||
mkdir -p build/dist
|
||||
rm -rf "build/dist/Sonic Robo Blast 2.app" "build/dist/srb2.app"
|
||||
|
||||
cp -r build/ninja-arm64_osx_vcpkg-release/bin/srb2.app build/dist/
|
||||
|
||||
lipo -create \
|
||||
-output "build/dist/srb2.app/Contents/MacOS/srb2" \
|
||||
build/ninja-x64_osx_vcpkg-release/bin/srb2.app/Contents/MacOS/srb2 \
|
||||
build/ninja-arm64_osx_vcpkg-release/bin/srb2.app/Contents/MacOS/srb2
|
||||
|
||||
mv build/dist/srb2.app "build/dist/Sonic Robo Blast 2.app"
|
7
scripts/x64-osx-1015.cmake
Normal file
7
scripts/x64-osx-1015.cmake
Normal file
|
@ -0,0 +1,7 @@
|
|||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
|
||||
set(VCPKG_OSX_ARCHITECTURES x86_64)
|
Loading…
Reference in a new issue