Europium production: neutron star mergers versus core-collapse supernovae