Rosanswers logo


We'd like to make our projects self-contained, so we are adding all possible (external) packages to our GIT repo as submodule, and build our project with catkin_make_isolated. This works with Ceres, Google Cartographer, etc., but does not seem to be working with some other module.

I added it as submodule, but the problem (apart from the missing package.xml, which I created) is that the CMakeLists.txt file is in a cmake/ directory, not in the package root. It looks like catkin_make_isolated fails to find the cmake/CMakeLists.txt file.

Moving or symlinking does not work, as the file uses other files in the cmake/ directory.

Is there a way to force catkin to look for CMakeLists.txt in cmake/?


Originally posted by shardator on ROS Answers with karma: 43 on 2018-07-24

Post score: 1


1 Answer 1


Rosanswers logo

While knowing more specifics about which package you're looking at would help give a more confident answer, I think the following may help:

  1. Add a new top-level CMakeLists.txt file in the location catkin is expecting
  2. Fill it with the basics (cmake_mininum_required(..), project(...), etc.)
  3. Use add_subdirectory(cmake) to tell catkin to look in the 'cmake' directory for another CMakeLists.txt file

Originally posted by mbarulic with karma: 51 on 2018-07-24

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by shardator on 2018-07-24:
Hi! Thank you, this solved the problem! I tried add_subdirectory before, but I did something wrong. Now everything is fine. (The package was google protocol buffer, protobuf3.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.