I think qemu doesn't use the optional dependencies at all if it doesn't build against them, so I don't think installing them after building it is actually an option if you want, for example, spice or virgl support in qemu...