No, it is not.
If you have a domain in .fr your website will be automatically ‘connected’ to Google.fr even though it is hosted outside French territory.
There are many methods to geolocate a website. Via Google Webmaster Tools, for example.
It will also be important to get backlinks from the targeted country.
Some hosts offer to directly geolocate the IP address of a domain name.