I've heard that some Christian churches were converted into mosques after Islam spread to those areas and took hold as the dominant religion of the area. For example, the Hagia Sophia was the main Cathedral of the Greek Orthodox Church for 1000 years before the Ottomans conquered Constantinople and converted it into a Mosque.
I'm wondering if it's possible for any old building to be converted into a mosque? Could my garage or bedroom or a school hall be converted into a mosque?