在clion中CMake高翔书《自动驾驶与机器人中的SLAM技术》时遇到如下报错:
CMake Error at thirdparty/livox_ros_driver/CMakeLists.txt:6 (find_package):
By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
asked 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.
解决方案:
在终端输入 printenv
将终端中的内容全部复制,然后打开clion的设置
点击最下面环境右侧红色框内的文本符号
点击粘贴->确定就行了