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:


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:


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:



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)
find_package(catkin REQUIRED)

Where PACKAGE_NAME is replaced by the name of your metapackage.

Wiki: catkin/MigratingMetapackagesToIncludeCMakeLists.txt (last edited 2013-04-01 21:56:26 by WilliamWoodall)