[cmake] fix binary linking