Yes, this is something you need to take care of yourself. What would be the best way depends a lot on how you install preCICE in Spack. In the packages.yaml
you could set default settings for packages to be built and also external packages like your existing OpenMPI installation.
You can also pass options to dependencies directly in the command line, i.e. something like
spack install precice ^openmpi +legacylaunchers schedulers=slurm
see, for example, the Spack tutorial. Note that I did not check whether the command here actually makes sense and would lead to a useful installation.