But the OS was licensed to IBM. MS could sell it to any HW vendor. The HW, with respect to the OS, wasn't proprietary. The MacOS wasn't simply licensed to run on Macs, it was built by Apple to only run on Macs. Despite some toe dips, there never any attempt to really license it.

The mistake IBM made wasn't the HW. It was that they let MS license them the OS on a non-exclusive basis. A genius move when you consider it -- most people would have had little belief there'd be a huge MS-DOS market once IBM entered the fold.