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

Copying files in devel folder - CMakeLists.txt

asked 2014-07-02 15:58:54 -0500

gariepya gravatar image


My application requires a configuration file and a resource folder placed in the same directory as the executable. Those are located at : ~/workspace/src/project/cfg/. I want to copy this file and this directory at ~/workspace/devel/lib/project/, where my executable is located.

What can I add to my CMakeLists.txt to achieve that? I have tried using ${CATKIN_PACKAGE_BIN_DESTINATION}, but it creates a lib subdirectory in build.

Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2014-07-02 16:21:43 -0500

Dirk Thomas gravatar image

updated 2014-07-03 01:16:41 -0500

The CATKIN_PACKAGE_BIN_DESTINATION variable only contains a relative path. You need to additionally use CATKIN_DEVEL_PREFIX. So combined you want to install to:


which will be:

edit flag offensive delete link more



gvdhoorn gravatar image gvdhoorn  ( 2014-07-02 23:50:15 -0500 )edit

Sorry, that was a copy-n-paste error - I updated the answer.

Dirk Thomas gravatar image Dirk Thomas  ( 2014-07-03 01:17:27 -0500 )edit

Thank you! I miss it in the documentation for some reason,..

gariepya gravatar image gariepya  ( 2014-07-03 08:04:55 -0500 )edit

I get something weird with "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}" I am getting this:


I really would like to get: <develspace>/.private/<packagename>/lib/

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2019-04-11 11:26:51 -0500 )edit

Instead of commenting on a 5 years old answered question please ask your own question with enough information.

Dirk Thomas gravatar image Dirk Thomas  ( 2019-04-11 11:32:39 -0500 )edit

Question Tools

1 follower


Asked: 2014-07-02 15:58:54 -0500

Seen: 2,435 times

Last updated: Jul 03 '14