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

catkin package CATKIN_DEPENDS question

asked 2014-09-12 03:09:23 -0500

Wolf gravatar image

updated 2014-09-12 03:12:25 -0500

I have the following structure.

my_first_package exposes its headers:

catkin_package(
  INCLUDE_DIRS include
#  LIBRARIES 
#  CATKIN_DEPENDS
#  DEPENDS systemlib
)

my_second_package depends on my_first_package. In my_second_package's CMakeLists.txt my_first_package is stated as CATKIN_DEPENDS:

catkin_package(
  INCLUDE_DIRS include
#  LIBRARIES 
  CATKIN_DEPENDS my_first_package
#  DEPENDS systemlib
)

my_third_package depends on my_second_package. It is able to "see" headers and stuff of my_second_package and my_first_package. However, in my_third_package depends's CMakeLists.txt my_second_package is !!not!! stated as CATKIN_DEPENDS:

catkin_package(
  INCLUDE_DIRS include
#  LIBRARIES 
#  CATKIN_DEPENDS #NOTE: not set
#  DEPENDS systemlib
)

Now: Will my_fourth_package which depends on my_third_package be able to "see" headers and stuff of my_first_package?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-09-12 08:55:47 -0500

Dirk Thomas gravatar image

No, since the third package does not depend on the second it also does not get the transitive dependency on the first package.

It might work if all packages are installed in the same location and the include folders are all the same after installation. But you should not rely on that. In an isolated build it should not work without adding the dependency explicitly.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-09-12 03:09:23 -0500

Seen: 323 times

Last updated: Sep 12 '14