CMake makefile

This pull request adds a CMake makefile for building the example with CMake.

I have tested this on Mac OS with gcc 4.7.