Dark matter is an important component of the Standard model of cosmology but its nature is still unknown. One of the most common explanations is that dark matter consists of Weakly Interacting Massive Particles (WIMPs), supposed to be cold thermal relics of the Big Bang and to build up the galactic dark halos. Indirect search of dark matter could be performed via the study of an anomalous antiproton component in cosmic rays originating from possible annihilation of dark matter pairs in the galactic halo, on top of the standard astrophysical production. The measurements performed by the AMS-02 and PAMELA spectrometers have shown that limited knowledge of antiproton-production cross sections in $pp$, $pD$, $pHe$ and $HeHe$ collisions is one of the main uncertainties of background subtraction. The planned SPD experiment at the NICA collider could provide a precision measurement of antiproton yield in wide kinematic range in $pp$ and $pD$ collisions at the energy scale from the threshold to $sqrt{s}=26$ GeV/$c$.