Just opened in 1876 when Adam did this panel, the Maryhill Barracks was used by various regiments until eventually becoming associated with the Highland Light Infantry or H.L.I. Soldiers then, like policemen, all wore mustaches.

The building where the two soldiers are shown could well be the still extant gatehouse, looking out onto the tenements on Maryhill Road, or more likely inwards the barracks themselves. Note the pan-tiled, rather than slated roofs, which was quite common at the time. 

Along with the gatehouse, the barracks wall remains, along with the iron bollards embossed with VR (Victoria Regina), as seen in the Canteen sign in the panel.