ethz-asl / maplab

A Modular and Multi-Modal Mapping Framework
https://maplab.asl.ethz.ch
Apache License 2.0
2.54k stars 721 forks source link

Cmake submodules for internal dependencies #402

Closed bhushanap closed 10 months ago

bhushanap commented 10 months ago

I was getting this cmake build issue:

By not providing "Findcatkin_simple.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "catkin_simple", but CMake did not find one. Could not find a package configuration file provided by "catkin_simple" with any of the following names: catkin_simpleConfig.cmake catkin_simple-config.cmake Add the installation prefix of "catkin_simple" to CMAKE_PREFIX_PATH or set "catkin_simple_DIR" to a directory containing one of the above files. If "catkin_simple" provides a separate development package or SDK, be sure it has been installed.

I tried to solve it initially by adding the required packages building them and trying to rebuild. But then a new package gave the same error.

(This had happened with me few months ago as well so I am making an issue to help anyone stuck on the same thing resolve it)

The problem in my case was the submodules were not cloned properly (even though sometimes it won't throw an obvious error about them not being cloned). This kept happening particularly for internal dependencies in my case I don't know why.

You can solve it using:

git submodule update --init --recursive

inside your cloned git directory