Skip to content

How to Target Both arm64 and x86_64 for Mac Builds #1809

Closed Answered by TyelorD
TyelorD asked this question in Q&A
Discussion options

You must be logged in to vote

For anyone else who's curious I managed to do this with minimal work (though I'm not currently using Cmake to build or deploy, but instead Xcode, so your mileage will likely vary).

For me all I did was remove support for the astcenc library, which I didn't need anyways, and then setup libpng to be precompiled, since it can't currently be compiled to both architectures through a single build. Instead I build arm64, and then x86_64, and then create a fat library with both using lipo. I wrote a little shell script to automate this as well so that I can easily update libpng in the future if needed.

I have to admit though, it does disappoint me that this isn't supported out of the box. Is ther…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by TyelorD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant