We show how to tailor the depth of focus for an optical system using pupil functions obtained from a Fourier transform approach. These complex amplitude and phase pupil functions are encoded onto a single liquid-crystal spatial light modulator. Experimental results show excellent agreement with theory and indicate the power of this approach.