Should I link ${catkin_LIBRARIES} to my library, or to executables?
Here's an excerpt from my CMakeLists.txt:
add_library(my_lib <some source files>)
target_link_libraries(my_lib ${catkin_LIBRARIES})
add_executable(my_node <some source files)
target_link_libraries(my_node my_lib)
I found that everything works fine if I link ${catkin_LIBRARIES} to either my_node
or my_lib
. So is either way preferred for any reason? Is there any convention?