Calibrated, cosmological hydrodynamical simulations with variable IMFs I: method and effect on global galaxy scaling relations