1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2025-09-04 07:20:15 +02:00

Build script for self-contained Mac .app (#185)

* Add CMake settings to build universal binary and find SDL in app bundle

* Source frameworks from extern folder

* Add build script, info plist and big sur style icon

* Add example build workflow (app won't be signed)

* Use macOS 11 runner for better compatibility

* Use better name for the build script, move metadata to Platform/macOS/ folder

* Improve macOS build instructions

* Fix workflow syntax and use a more specific glob pattern too

* Add libs search paths to CMakeLists.txt instead of find files

* Use same /Libs folder as libs search path

* Make build-mac-app.sh not fail on repeated runs

* Make build-mac-app.sh executable
This commit is contained in:
Orazio 2023-08-01 08:01:56 +02:00 committed by GitHub
parent e2f3ae66f8
commit 6ab7b3e772
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 133 additions and 1 deletions

View file

@ -19,6 +19,15 @@ if(MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
endif()
if(APPLE)
set(MACOSX_RPATH)
set(CMAKE_BUILD_WITH_INSTALL_RPATH true)
set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
list(APPEND SDL2_PATH "${CMAKE_CURRENT_LIST_DIR}/Libs")
list(APPEND SDL2_MIXER_PATH "${CMAKE_CURRENT_LIST_DIR}/Libs")
endif()
# SDL2main is not needed
set(SDL2_BUILDING_LIBRARY ON)