The inclusive transverse-momentum distribution in hadronic systems produced in proton-proton collisions