diff --git a/mavros/CMakeLists.txt b/mavros/CMakeLists.txt index 5fb1f7baa..03b7f883e 100644 --- a/mavros/CMakeLists.txt +++ b/mavros/CMakeLists.txt @@ -103,7 +103,7 @@ add_library(mavros src/lib/rosconsole_bridge.cpp ) add_dependencies(mavros - mavros_msgs_generate_messages_cpp + ${catkin_EXPORTED_TARGETS} ) target_link_libraries(mavros atomic diff --git a/mavros_extras/CMakeLists.txt b/mavros_extras/CMakeLists.txt index e557878a0..94ad1960f 100644 --- a/mavros_extras/CMakeLists.txt +++ b/mavros_extras/CMakeLists.txt @@ -84,6 +84,9 @@ add_library(mavros_extras src/plugins/vision_pose_estimate.cpp src/plugins/vision_speed_estimate.cpp ) +add_dependencies(mavros_extras + ${catkin_EXPORTED_TARGETS} +) target_link_libraries(mavros_extras ${mavros_LIBRARIES} ${catkin_LIBRARIES}