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

Revision history [back]

click to hide/show revision 1
initial version

For what you are describing I would recommend CMake's ExternalProject system:

http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html

It is functionally equivalent to the download_unpack_build like macros in rosbuild. The best thing to do would be to setup a REP-0136 compliant non-catkin package. That way it can be released and it can be built as part of a catkin workspace without downloading during the build:

http://www.ros.org/reps/rep-0136.html

However, if you are not going to release this or release things which depend on it, then it probably is fine to use CMake's ExternalProject system.

For what you are describing I would recommend CMake's ExternalProject system:

http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html

It is functionally equivalent to the download_unpack_build like macros in rosbuild. The best thing to do would be to setup a REP-0136 compliant non-catkin package. That way it can be released and it can be built as part of a catkin workspace without downloading during the build:

http://www.ros.org/reps/rep-0136.html

However, if you are not going to release this or release things which depend on it, then it probably is fine to use CMake's ExternalProject system.

EDIT:

If you wan to pass along the link flags and include directories to downstream catkin packages, you will need to create a CMake Config file or use catkin to generate one for you. This catkin macro effectively generates a <package_name>-config.cmake file for you based on the parameters, it should look like this:

find_package(catkin REQUIRED)

# Somehow set gpertools_LIBRARIES and gperftools_INCLUDE_DIRS

catkin_package(
  INCLUDE_DIRS ${gperftools_INCLUDE_DIRS}
  LIBRARIES ${gperftools_LIBRARIES}
)