Cmake

Merge my cmake branch back into master - it works now.