ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Installing Headers DESTINATION ERROR

asked 2016-03-18 19:44:46 -0600

updated 2016-03-18 19:45:54 -0600


I am using a ROS metapackage system to install certain header files to the include directory under catkin_ws/devel. My CMakeLists.txt is as follows:

          install(DIRECTORY include/${PROJECT_NAME}
                  FILES_MATCHING PATTERN "*.h"
                  PATTERN ".svn" EXCLUDE)

I amsimply following the enumeration here: For some reason, I keep hitting the brick as in :

                     CMake Error at gocator_bridge/CMakeLists.txt:15 (install):
                                              install DIRECTORY given no DESTINATION!

Could I be missing something?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-19 02:39:33 -0600

gvdhoorn gravatar image

Could I be missing something?

Metapackages are not meant to do anything but gather run_depends (from wiki/catkin/package.xml - Format 1 (Legacy) - Metapackages):

It is often convenient to group multiple packages as a single logical package. This can be accomplished through metapackages.

This is speculation, but you're probably getting that error because CATKIN_PACKAGE_INCLUDE_DESTINATION is not defined for metapackages.

See catkin metapackage now requires CMakeLists.txt? and wiki/catkin/package.xml - Format 1 (Legacy) - Metapackages for some more info.

edit flag offensive delete link more


Thank you indeed for the references. I had to set my DESTINATION to one of the packages within the metapackages' include directory to work around this.

lakehanne gravatar image lakehanne  ( 2016-03-19 05:33:32 -0600 )edit

Just to be sure, not the part where you're not supposed to install anything with metapackages.

gvdhoorn gravatar image gvdhoorn  ( 2016-03-19 07:17:20 -0600 )edit


[..] within the metapackages' include directory [..]

? Metapackages are empty. How can it have an include directory?

gvdhoorn gravatar image gvdhoorn  ( 2016-03-19 07:18:15 -0600 )edit

I chose the include directory of one of the sub packages within the meta-package as the installation destination. Is this clearer?

lakehanne gravatar image lakehanne  ( 2016-03-19 07:36:11 -0600 )edit

It's all up to you obviously. As long as "within the meta-package" does not actually mean that you are storing packages inside the directory of the metapackage. Also, your comment could still be understood as the metapackage installing headers, and that is not something you shoul do.

gvdhoorn gravatar image gvdhoorn  ( 2016-03-19 08:26:00 -0600 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2016-03-18 19:44:46 -0600

Seen: 434 times

Last updated: Mar 19 '16