Rearrange Config.cmake and cotninue porting Config.pp