1. 程式人生 > >程序找不到PCL的CMake files,catkin_make時報錯

程序找不到PCL的CMake files,catkin_make時報錯

dev path require pro com gpo win director with

錯誤提示:

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)

程序找不到PCL的CMake files,catkin_make時報錯