libgit2/libgit2 — Issue #450: building a 32/64 "fat" library for OS X (Darwin)
Author: boyski
Created: 2011-10-11 11:57:42+00:00
State: open

When I build my own app for Mac I use the "-arch i386 -arch x86_64" flags to gcc. This tells it to build a fat binary which works on either 32- or 64-bit systems:

% file ao
ao: Mach-O universal binary with 2 architectures
ao (for architecture i386):	Mach-O executable i386
ao (for architecture x86_64):	Mach-O 64-bit executable x86_64

But I can't link with libgit2 because I can't figure out how to get cmake to build it in a similar style. Any clues? I'm agnostic aka clueless on the subject of whether this should be the default or I just need an override mechanism.