update OS X examples and CMakeLists.txt