Solutions to WDVV from generalized Drinfeld-Sokolov hierarchies