Ask Your Question
0

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
2

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 imageDavid 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 imageDirk 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 imageDavid Kristiansen ( 2018-05-23 11:29:27 -0500 )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

1 follower

Stats

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

Seen: 150 times

Last updated: May 23 '18