Handling of the different cases in the cmake generation.