在CMakeLists.txt编译时经常会遇到的一个问题是找不到相应的package,例如报错如下:
CMake to find a package configuration file provided by "catkin",
but CMake did not find one. Could not find a package configuration file provided by "catkin" with any of the following names: catkinConfig.cmake catkin-config.cmake
Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set "catkin_DIR" to a directory containing one of the above files.
If "catkin" provides a separate development package or SDK, be sure it has been installed.