I am inclined to think the larger domed building looks like Hagia Sophia, except since the photo is so very faded, I am not sure if I can see the high towering minarets that are situated beside it. Anyway the shape of the dome reminds me of architecture of the Ottoman empire.
Has a weapon expert given you a date for that rifle? That might also be helpful to know.
While googling Hagia Sophia to find more photos I came across the attached picture from the Wikimedia commons -
https://commons.wikimedia.org/wiki/File:Mesjid-Aya-Sofia-Salonika.jp of the
Hagia Sophia, Thessaloniki. There was apparently a fire in 1890 and the dome was damaged, but later restored - not sure when.
Google maps link to location - from which I doubt that it would be visible from any army camp, unless the city was far smaller back then with the church on the outskirts. (If you go to google street view and move out of the city then the landsacape is much greener and tree-covered than I expected, with low hills)
The other examples of Byzantine churches converted to mosques all appear to be in Istanbul itself, which I think makes them even less likely.
There were apparently a few Byzantine Eastern Orthodox churches (which is where the domes come from) that were converted to mosques (which is when the minarets were added) when the Ottomans took over, Hagia Sophia in Istanbul being the largest and most well known.
Most intriguing and unexpected, as this could put us back in the Salonika Campaign - if the building is a Byzantine church/mosque. But I have my doubts.
I'm still trying to get a better copy of the photo I posted, since the JPG artefacts are quite bad. I've attached a screenshot from GIMP with the upper half being a crop from the photo I posted and the lower half being the same thing but with the levels stretched, making the 8x8 pixel JPG artefacts more obvious.