[cairo] Mac OS X, getting started?

Henry (Yu) Song - SISA hsong at sisa.samsung.com
Fri Feb 1 21:40:12 PST 2013


Hello

I have created a cairo backend for NSOpenGL, it is located https://github.com/csyuschmjuh/cairo-nsgl/commits/master, is synced with 1.12.9.  I am planning to upstream it once I got some litttle things iron out.  You can try it out.  It still requires pixman, zlib, pkgconfig from macport, but X, and mesa are not required, if you want to build cairo with apple's native OpenGL.  The boilerplate code in boilerplate/cairo-boilerplate-nsgl.m shows how to create NSwindow, NSView and such.

Without mesa driver, you can build cairo like "./autogen.sh --prefix=.... --enable-gl=yes" - this builds cairo gl backend to use osx Opengl and nsopengl, then "make", "make install".
You can also test the cairo test by "make test TARGETS=nsgl"

With mesa driver from macport, you need to do this "./autogen.sh --prefix=.... --enable-gl=yes --enable-glx=no --enable-nsgl=yes" - because nsopengl and glx are mutually exclusive at the moment, they both contains same gl symbols.

Let me know if you encounter problems.

Henry

________________________________________
From: cairo-bounces+hsong=sisa.samsung.com at cairographics.org [cairo-bounces+hsong=sisa.samsung.com at cairographics.org] on behalf of The Devils Jester [thedevilsjester at gmail.com]
Sent: Friday, February 01, 2013 6:51 PM
To: cairo at cairographics.org
Subject: [cairo] Mac OS X, getting started?

Greetings!

I am looking into using Cairo as a graphics backend for a project of mine and am having trouble getting a Mac OS X build setup.  Using MacPorts, or Homebrew both want to pull the XQuartz version when I do not want that.

There is a how to of sorts on http://www.cairographics.org/end_to_end_build_for_mac_os_x/

But this is a very dated how to and does not appear to work at certain stages (this is probably due to some of the package versions linked to in the how to not being available at those locations anymore and using new versions, i.e. libpng and due to OS X 10.8 changes).  Not only this, but I am not interested in PPC support or fat binaries or 32bit support.

Does anyone have a more updated compile how to?

Second, and just as important, I cannot seem to find a "window based" hello world example for Mac OS X.  The only code I can find is for xorg window creation.  Does anyone have an example for Mac OS X?


More information about the cairo mailing list