How to install relevant shared libraries along with executionable using cmake

sorry, but i have no idea, what cpack does, never used that.