[cairo] Universal Framework for Mac OS X
Andreas Krinke
andreas.krinke at gmx.de
Sun Mar 22 10:09:55 PDT 2009
Hello list!
I had a really hard time to create an universal framework for Mac OS X.
The only ones I could find (e.g. from the gtk-osx project) didn't
support ppc.
You can download the file here:
http://basique.users.sourceforge.net/Cairo-1.8.6.universal.framework.zip
This framework was created on OS X 10.4, so this should be the minmum OS
version required. It runs on both ppc and intel macs.
It contains cairo 1.8.6, libpixman 0.14 and libpng 1.2.35.
Usage:
Copy the framework to /Library/Frameworks. This is only needed for
proper linking of your app.
Add /Library/Frameworks/Cairo.framework to your xcode project ("Linked
Frameworks").
Edit the project settings and add the following to the "Other Linker Flags":
-dylib_file
@executable_path/../Frameworks/Cairo.framework/Libraries/libpixman-1.0.14.0.dylib:/Library/Frameworks/Cairo.framework/Libraries/libpixman-1.0.14.0.dylib
and
-dylib_file
@executable_path/../Frameworks/Cairo.framework/Libraries/libpng12.0.dylib:/Library/Frameworks/Cairo.framework/Libraries/libpng12.0.dylib
These flags are needed for the linker. ld only supports absolute paths.
Later at runtime the dynamic linker dyld uses the relative paths
embedded in the libraries/framework to find them.
Don't forget to copy the framework to the bundle.
After compiling and linking the resulting bundle contains everything
needed and can be distributed.
I will post the details of the framework creation if there is interest.
Regards,
Andreas Krinke
More information about the cairo
mailing list