Link libraries to targets.