Original: The building has a mosque built around it, the Masjid al-Haram.
Simplified: The mosque was built around the original Kaaba.