Cmake fixes

This is a start for issue #15.