Imported parts of previous master cmake file