Hey mate,
Been running that setup for years. Gaming PC to iMac.
Just get yourself a display port to mini display port cable and your gold.
If your not sure which one to get, just message me, I should still have the one I purchased saved in my eBay or Amazon accounts.