ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ament_target_dependencies() is only intended to be used with other ament packages.

For external packages, you should use the regular CMake facilities. For example, try changing your CMakeLists.txt to:

find_package(PkgConfig)
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0
                    gstreamer-app-1.0)
add_executable(server src/my_server.cpp)
ament_target_dependencies(server
    rclcpp my_interfaces)
target_include_directories(server PUBLIC
 "${GSTREAMER_INCLUDE_DIRECTORIES}")
target_link_libraries(server
 "${GSTREAMER_LIBRARIES}")