No city shall acquire lands or erect buildings outside its limits for the purpose of caring for its poor, without the consent of the governing body of the municipality in which the lands are situated.