Like the kwarg of the same name in custom_target(), env allows you to set the environment in which the generator will process inputs.
custom_target()
env