This is actually a pretty decent question if you assume that he's not talking about doing any actual gambling himself.
It's a similar question to whether it's ok to own or work at a food establishment that involves serving pork.
...
I think it is more like, whether it's ok to wear a billboard on your body
along the side of the street, that is advertising the consumption of pork
for a certain food establishment, that sells only pork. In that context,
it is likely haram, except in instances where that is the only job you
can get and others depend on you. If you could do other things to
attain that money within the law, God would prefer those actions.
If the OP is even asking the question, it is likely they should not do it.
Justifying loopholes in God's Law are willful violation attempts, which
are worse than the actual deed performed without the loophole.
I am not a muslim, so take my words with a grain of salt.