Fix CMake build

- Add CMake macro and use it to link Carbon and Cocoa
- Use "APPLE" CMake var instead of "Q_WS_MAC"
- Add *.mm files to the CMake source list