[Documentation] [TitleIndex] [WordIndex

Migrating Metapackages to Include CMakeLists.txt

Initially metapackages in catkin were not allowed to have any CMakeLists.txt to discourage users from having non-metapackage catkin packages which depended on metapackages. After some discussions on the ros-sig-buildsystem mailing list:

https://groups.google.com/forum/#!msg/ros-sig-buildsystem/mn-VCkl2OHk/dUsHBBjyK30J

It was decided that in order to have package.xml's of metapackages available in the install space, metapackages would now have a CMakeLists.txt, but that it would be boilerplate and the contents would be enforced to prevent the misuse of metapackages.

This change precipitated into a change in the REP:

https://github.com/ros-infrastructure/rep/commit/33b60d566324c66f5ad03946116020c062a53991

It also resulted in changes in catkin 0.5.65 which affects Groovy and Hydro.

It also resulted in bloom requiring the boilerplate CMakeLists.txt in order to release as of 0.3.3.

Updating metapackages to comply with REP-0127

First your metapackage's package.xml should now include a <buildtool_depend> on catkin:

...

<buildtool_depend>catkin</buildtool_depend>
...

This is necessary as the metapackage now needs catkin at build time for invoking the CMakeLists.txt.

Then the metapackage needs this boilerplate CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8.3)
project(PACKAGE_NAME)
find_package(catkin REQUIRED)
catkin_metapackage()

Where PACKAGE_NAME is replaced by the name of your metapackage.


2024-12-14 14:43