Some cmake fixes