The money arising from the sales of lots, after paying all the expenses accruing in the selection of the county seat, in laying out the town and selling lots, shall be applied, first, to paying for the land purchased, if any, and the residue shall be set apart as a specific fund for the purpose of erecting county buildings, and shall be applied to no other purpose, until all the county buildings required by law to be erected, shall be fully completed and paid for.