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

Posted hello-pdg

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了程序找不到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)

以上是关于程序找不到PCL的CMake files,catkin_make时报错的主要内容,如果未能解决你的问题,请参考以下文章

找不到CMAKE必需的头sys / stat.h

CMake 找不到提升。

如何用pcl配置visual studio 2010

使用 Makefile 将 PCL(点云库)添加到现有项目

将库链接到另一个应用程序时,cmake 找不到库

使用 CMake、conan 和 Vulkan SDK 的 Github 操作失败,因为找不到 conanfile.py