Skip to content

Commit 36cf453

Browse files
committed
Use target_link_libraries instead of ament_target_dependencies where applicable
This is a more modern way to link ROS libraries in CMake
1 parent e9ec498 commit 36cf453

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,15 @@ add_executable(${PROJECT_NAME}
5555
)
5656

5757
ament_target_dependencies(${PROJECT_NAME}
58-
async_web_server_cpp cv_bridge image_transport rclcpp sensor_msgs)
58+
sensor_msgs
59+
)
5960

6061
## Specify libraries to link a library or executable target against
6162
target_link_libraries(${PROJECT_NAME}
63+
async_web_server_cpp::async_web_server_cpp
64+
cv_bridge::cv_bridge
65+
image_transport::image_transport
66+
rclcpp::rclcpp
6267
${Boost_LIBRARIES}
6368
${OpenCV_LIBS}
6469
${avcodec_LIBRARIES}

0 commit comments

Comments
 (0)