updated cmakes to build proto files before code