All buildings must be destroyed in order for a player to lose, see Blizz Rules. Note, that this does not constitute a "win" condition, only a "lose" condition. In the event that a player hits a "lose" condition, while the other player does not, the other player THEN hits a "win" condition.
This is important because in a condition where players are racing to destroy each other buildings, the one that was destroyed quicker down to the millisecond, will trigger the "lose" condition for the first player, preventing the second one from hitting a "lose" condition, doing it this way prevents a "double win" miss-hap.
It's also important to remember that buildings in flight and mid-construction are also building units counting towards the players "not-yet-lost" condition. Units like Creep tumors are considered food-cost-less units, not buildings.
Also note, that there are "stalemate" conditions, when neither player can take such action as to cause the other player into a "lose" condition, see Team Liquid Wiki