Migration Assistant would have handled this as part of an overall transfer of stuff, but apparently you didn't choose to use it.
Assuming we are talking about an up-to-date version of iPhoto, simply copying the library file over should work fine. You then need to open iPhoto using the option key, point it at the copied library, and that should bring over all structure, ratings, faces data etc.
What version of iPhoto is on the iMac?