程序找不到PCL的CMake files,catkin_make时报错

错误提示:

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by "PCL" with any of
the following names:

PCLConfig.cmake
pcl-config.cmake

Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
to a directory containing one of the above files. If "PCL" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
turtlebot3_rgbdslam/CMakeLists.txt:13 (find_package)


-- Could not find the required component ‘PCL‘. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "PCL" with any of
the following names:

PCLConfig.cmake
pcl-config.cmake

Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
to a directory containing one of the above files. If "PCL" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
turtlebot3_rgbdslam/CMakeLists.txt:13 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/pdg/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/pdg/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:1704: recipe for target ‘cmake_check_build_system‘ failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

解决方法:

在CMakeLists.txt中find_package()前添加 set(PCL_DIR /usr/share/pcl-1.8)

文章来自:https://www.cnblogs.com/hello-pdg/p/8361598.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3