Migrating to cmake