The 7.5-magnitude quake, centered on the Pacific Coast in the state of Oaxaca, damaged some structures and caused buildings to sway in Mexico City.