Just take a look at "target_link_libraries" in the cmake documentation...