I'm trying to distribute cairo (1.10.2) with my application. I can create the necessarily dylibs using Homebrew but they are dependent on versions of other dynamic libraries that aren't present in OS X 10.5 (libfontconfig, libfreetype, and others located primarily in /usr/X11/lib
).
I assume to solve this I want it to be using the dylibs in /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib
rather than the libraries in /usr/X11/lib
. I've tried anything I could find for targeting cairo against the 10.5 SDK.
- Setting
MACOSX_DEPLOYMENT_TARGET
environment variable to10.5
(before callingbrew
or using Homebrew'sENV
) - Setting
SDKROOT
environment variable to "/Developer/SDKs/MacOSX10.5.sdk" (before callingbrew
or using Homebrew'sENV
) - Adding
-mmacosx-version-min=10.5
to theCFLAGS
,CXXFLAGS
, andLDFLAGS
in the Homebrew formula for cairo. - Adding
-sysroot
/-isysroot /Developer/SDKs/MacOSX10.5.sdk
to theCFLAGS
,CXXFLAGS
, andLDFLAGS
in the Homebrew formula for cairo. - Adding
-I$(SDKROOT)/usr/X11/include
and-I$(SDKROOT)/usr/X11R6/include
to theCFLAGS
andCXXFLAGS
in the Homebrew formula for cairo. - Adding
-L$(SDKROOT)/usr/X11/lib
and-L$(SDKROOT)/usr/X11R6/lib
to theLDFLAGS
in the Homebrew formula for cairo.
While building cairo it has -I/usr/X11/lib
on the gcc commands (with my options tacked on the end) so I imagine it's hitting that first. I'm not sure how to get rid of that so it uses my options. I thought isysroot
would make it so the include and library paths were rerooted in the SDK but -isysroot
doesn't seem to have any effect.
/opt/local/etc/macports
and/opt/local/etc/variants
. – Particulate