Fixes to cmake.