Shaikh al-Albani rahimahullah was asked about this from a questioner who was from Boston in the U.S. He was asked:
If a person works in a place that sells pork, may Allah grant you honor, and he does not touch the pork nor sell it, but the store which he works in sells this pork, is this person’s earnings unlawful or lawful?
What is the store oh my brother?
It is a store that sells food.
Food from which is pork?
There is no intoxicant that is part of it?
There is no intoxicant?
Is there anything else prohibited there?
There is a machine that is used for gambling.
Then it is not allowed for a Muslim to enter this place, [just] entering and exiting, let alone enter and work in it as an employee because Allah said:
فلا تقعد بعد الذكرى مع القوم الظّالمين
Then after the remembrance sit not you in the company of those people who are the Zalimun (polytheists and wrong-doers, etc.)
The Messenger of Allah sallalahu alayhi wa salam said:
من كان يؤمن بالله واليوم الآخر فلا يقعد على مائدة بدار فيها الخمر
And whoever believes in Allah and the Last Day, then he is not to sit at a table in which Khamr is circulated
[Graded Saheeh by al-Albani in al-Irwaa no. 1949]
It is not sufficient that a Muslim does not drink intoxicants. It is necessary that he is far away from the places of evil. So like this, this earning which this man has earned who works at that place which sells pork and where gambling is done, this earning is unlawful.
Alright, may Allah reward you with good.
[Silsilatul-Huda wan-Nur no. 347]
Faisal Ibn Abdul Qaadir Ibn Hassan
Also the Lajnah mentioned its prohibition here.