We consider constraints on primordial black holes (PBHs) in the mass range $(
10^{-18}$ - $10^{15} )\,M_{\odot}$ if the dark matter (DM) comprises weakly
interacting massive particles (WIMPs) which form halos around them and generate
$\gamma$-rays by annihilations. The observed extragalactic $\gamma$-ray
background then implies that the PBH DM fraction is $f^{}_{\rm PBH} \lesssim
10^{-10}\,( m_{\chi} / {\rm TeV} )^{1.1}$ in the mass range $2 \times
10^{-11}\,M_{\odot}\,( m_{\chi} / {\rm TeV} )^{-3.2} \lesssim M \lesssim 3
\times 10^{11}\,M_{\odot}\,( m_{\chi} / {\rm TeV} )^{1.1}$, where $m_{\chi}$
and $M$ are the WIMP and PBH masses, respectively. This limit is independent of
$M$ and therefore applies for any PBH mass function.For $M \lesssim 2\times
10^{-11}\,M_{\odot}\,( m_{\chi} / {\rm TeV} )^{-3.2}$, the constraint on
$f^{}_{\rm PBH}$ is a decreasing function of $M$ and PBHs could still make a
significant DM contribution at very low masses. We also consider constraints on
WIMPs if the DM is mostly PBHs. If the merging black holes recently discovered
by LIGO/Virgo are of primordial origin, this would rule out the standard WIMP
DM scenario. More generally, the WIMP DM fraction cannot exceed $10^{-4}$ for
$M > 10^{-9}\,M_{\odot}$ and $m_{\chi} >10\,$GeV. There is a region of
parameter space, with $M \lesssim 10^{-11}\,M_{\odot}$ and $m_{\chi} \lesssim
100\,$GeV, in which WIMPs and PBHs can both provide some but not all of the DM,
so that one requires a third DM candidate.