I did the same for my SUV recently as I don't have open storage of a bed, and I don't care to store fuel inside the vehicle. Rotopax makes a variety of fuel containers and something can be had to fit any car. I use it as reserve fuel for my tow vehicle, but also for the generator.
Unfortunately, they don't make carriers for stock vehicle roof rack cross bars so I had to roll my own. Using Yakima crossbar adaptors, aluminum extrusions, and with a bit of the AS rivet inspiration.
Couple pics of my Fuelpax 3.5gallon container.