Whenever it is necessary to secure any lands for a right-of-way for any county road or for the drainage thereof or to afford unobstructed view toward any intersection or point of possible danger to public travel upon any county road or for any borrow pit, gravel pit, quarry, or other land for the extraction of material for county road purposes, or right-of-way for access thereto, the board may acquire such lands on behalf of the county by gift, purchase, or condemnation. When the board so directs, the prosecuting attorney of the county shall institute proceedings in condemnation to acquire such land for a county road in the manner provided by law for the condemnation of land for public use by counties. All cost of acquiring land for right-of-way or for other purposes by purchase or condemnation shall be paid out of the county road fund of the county and chargeable against the project for which acquired.