RigelEngine icon indicating copy to clipboard operation
RigelEngine copied to clipboard

Build universal binary (ARM and x64) for Mac

Open lethal-guitar opened this issue 4 years ago • 1 comments

I tried using the CMAKE_OSX_ARCHITECTURES flag and that generally seems to work as far as CMake is concerned, but fails to build because of platform specific code in the SDL headers.

I checked and the SDL Mac binaries available via the SDL website are already fat binaries, so we could use these instead of installing via Homebrew. Unfortunately, the same is not true for the SDL_mixer Mac binaries.

A few ways to go about this:

  • Use the SDL binaries from libsdl.org instead of Homebrew, and build SDL_mixer from source - it's a small library, shouldn't take too long on CI and we can use GitHub Actions' caching mechanism
  • Figure out a way to get Homebrew to install fat versions of the libraries
  • Wait until SDL_mixer starts shipping fat binaries as well

Note that using the binaries from the SDL website has its own set of challenges - see #706 for more info.

lethal-guitar avatar Jul 25 '21 21:07 lethal-guitar

Also see https://github.com/libsdl-org/SDL_mixer/issues/291

lethal-guitar avatar Aug 27 '21 08:08 lethal-guitar

macsourceports.com provides a 3rd party build which fulfills these requirements.

lethal-guitar avatar Oct 16 '22 13:10 lethal-guitar