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

Remove ROS artifact from CMake install

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

David Kristiansen gravatar image

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

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

INSTALL(TARGETS ${PROJECT_NAME}_node  DESTINATION bin)
INSTALL(FILES doc/${PROJECT_NAME}.yaml DESTINATION share)
INSTALL(FILES doc/${PROJECT_NAME}.service DESTINATION lib/systemd/system)

SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Maintainer")
SET(CPACK_GENERATOR "DEB")

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

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

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
4

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

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

Comments

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 -0500 )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 -0500 )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 -0500 )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 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-05-23 07:33:54 -0500

Seen: 604 times

Last updated: May 23 '18