It's the best way to go. There's a couple of simple ways to do it ("simple" depends on your own abilities.)
One way is to cut down the rear motor mount block, or add shims to space the motor away from, or closer to the frame.
The best way to do this is with the bike upside down (drained of fuel, unless you have one of those magic, rare gas caps that don't leak.)
Get the pedal side chain tensioned first, with the engine chain slack.
Loosen front motor mount and remove rear mount.
Slide engine foward or backward till engine chain is tensioned.
Check the gap in the rear motor mount, then cut the motor mount block to fit, or add shims between engine and mm block.
Tighten rear mount, and you're good.
That's the theory, anyway. The reality, is you'll probably find your engine chain too tight. When it looks like you need a half inch block, it'll more likely be 1/4". Experimenting with different shims will get it right.
Method two, is go up or down a tooth on the pedal side chainring or cog.
Rule of thumb I've found, is one tooth up or down will take up +/-, a half-inch on the motor side.
Going up or down two teeth will do nothing. You'll end up adding or removing a link in the motor side, and be back where you started.
Finally, all this is useless if you have a bike that the engine chain will rub excessively on the frame.
Then you'll have to mess with wheel spacing, frame spacing, etc.
But I've never built a bike that I couldn't figure out, no matter what the frame shape, so it can be done.