The county boards of education of the counties which have formed a consolidated school composed of territory lying within different counties shall apportion funds to the consolidated school or schools in the same manner as to any other school in the county. The funds apportioned to such consolidated school shall be paid over to the custodian of school funds of the county in which the school building is located or is to be located.