You need to have a caloric surplus and maintain protein levels (which varies on who you read, I've seen 1g/lb of lean body mass). It can be hard to do a lot of cardio and gain weight at the same time because you will need to take in over your metabolic rate and the amount you are burning off during cardio.