Ask Your Question
2

catkin_package(CATKIN_DEPENDS ...) vs. find_package(catkin REQUIRED COMPONENTS ...)

asked 2017-05-03 16:45:18 -0600

2ROS0 gravatar image

Hi,

Let's say I have a package A that depends on sensor_msgs. I have to add sensor_msgs to both

find_package(catkin REQUIRED COMPONENTS sensor_msgs)

catkin_package(CATKIN_DEPENDS sensor_msgs)

What is the difference between the two? What purpose do each of them solve? For instance, I noticed that message_generation has to be in the find_package call while the message_runtime has to be in catkin_package call. Why are they not in both?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-05-03 20:00:28 -0600

kmhallen gravatar image

find_package() finds dependencies for this package.

catkin_package(CATKIN_DEPENDS) declares dependencies for packages that depend on this package.

For example: message_generation is needed by this package to build messages, while message_runtime is needed by dependent packages to use the already generated messages.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-05-03 16:45:18 -0600

Seen: 3,391 times

Last updated: May 03 '17