Ask Your Question

Remove ROS artifact from CMake install

asked 2018-05-23 07:33:54 -0600

David Kristiansen gravatar image

updated 2018-05-23 07:41:22 -0600

I am using CPack to create .deb binaries. The relevant part of the CMakeLists.txt looks like this:

INSTALL(FILES doc/${PROJECT_NAME}.service DESTINATION lib/systemd/system)


The .deb file gets build fine, the only problem i have is that ROS is adding som files:

  • .catkin
  • local/.rosinstall
  • local/
  • local/setup.{sh,bash,zsh}
  • local/

Any idea on how I can stop those files from appearing?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-23 09:12:05 -0600

Dirk Thomas gravatar image

To skip the generation / installation of these prefix level files you can pass -DCATKIN_BUILD_BINARY_PACKAGE=1 to the CMake invocation.

edit flag offensive delete link more


This has bothered me for the good part of this day. This worked perfectly. Thank you. Is there some way of adding this to CMakeLists.txt?

I was a little fast there. I added SET(CATKIN_BUILD_BINARY_PACKAGE true) in my CMakeLists.txt. :)

David Kristiansen gravatar image David Kristiansen  ( 2018-05-23 09:18:36 -0600 )edit

I wouldn't recommend that. Basically when you build the package from source you want these files to be created (in order to setup the environment to use them). It is a packaging specific argument. I am not sure if you can define CPack specific CMake arguments in the CMake file.

Dirk Thomas gravatar image Dirk Thomas  ( 2018-05-23 11:26:22 -0600 )edit

That is a very good point. I will have to look into that!

David Kristiansen gravatar image David Kristiansen  ( 2018-05-23 11:29:27 -0600 )edit

Hi, where can I find the documentation of the macro "CATKIN_BUILD_BINARY_PACKAGE"? I tried to search in Google but didn't find any link.

yaobin gravatar image yaobin  ( 2020-12-01 14:47:10 -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: 2018-05-23 07:33:54 -0600

Seen: 262 times

Last updated: May 23 '18