Shaykh Abdul Azeez ibn Baaz rahimahullaah was asked in his Majmoo` Fataawaa vol. 14, page 294:
Q: What is the ruling of spending zakaat (obligatory charity) money for the purpose of building a mosque that is nearing completion, however building work on it has stopped?
A: It is well-known amongst all of the scholars, and (also) the opinion of the majority and most of the scholars – and this is similar to the consensus of the scholars of the Salafus-Saalih (pious predecessors) of old -: that zakaat (obligatory charity) is not to be used for the building of a mosque, or for buying books, and the like of that.
Rather it (zakaat) is to be paid to the eight categories that have been mentioned in the verse in Sooratut-Tawbah (9:60); and they are: (1) the poor, (2) and the needy, (3) and those employed to collect zakaat, (4) to attract the hearts of those who have been inclined towards Islam, (5) and for freeing captives or slaves, (6) and for those in debt, (7) and for Allaah’s cause, (8) and for the stranded traveler.
‘In Allaah’s cause’ is specific to Jihaad (i.e. legal Islamic warfare).
This is what is well-known to the people of knowledge, and it is not to be spent constructing mosques, nor for building schools, nor for (the construction) of roads & pathways, and the like.
And Allaah is the Granter of Success.