首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >用于PCL库的位置PCLConfig.cmake和pcl-config.cmake文件

用于PCL库的位置PCLConfig.cmake和pcl-config.cmake文件
EN

Stack Overflow用户
提问于 2016-05-25 15:11:59
回答 2查看 17K关注 0票数 4

我使用以下命令安装了PCL。

代码语言:javascript
运行
复制
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all

当我用下面的CMakeLists.txt行编译我的PCL程序时

代码语言:javascript
运行
复制
find_package(PCL 1.3 REQUIRED COMPONENTS)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

我有错误

代码语言:javascript
运行
复制
CMake Error at CMakeLists.txt:17 (find_package):
   By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
   asked CMake to find a package configuration file provided by "PCL", but
   CMake did not find one.

   Could not find a package configuration file provided by "PCL" (requested
   version 1.3) 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.

我无法在我的系统中找到PCLConfig.cmake和pcl-config.cmake。

我确实喜欢

定位PCLConfig.cmake

/home/ttt/.local/share/Trash/files/PCLConfig.cmake /home/ttt/.local/share/Trash/files/DemoApplications-master/Calculus/tv_auto_on_off/voxel-sdk/libvoxelpcl/VoxelPCLConfig.cmake.in /home/ttt/.local/share/Trash/files/config/VoxelPCLConfig.cmake.in /home/ttt/.local/share/Trash/files/voxelsdk.2/config/VoxelPCLConfig.cmake.in /home/ttt/.local/share/Trash/info/PCLConfig.cmake./home/ttt/Softwares/voxelsdk/config/VoxelPCLConfig.cmake.in /usr/lib/cmake/VoxelPCL/VoxelPCLConfig.cmake

说得通吗?

我试过

代码语言:javascript
运行
复制
set(PCL_DIR "/home/ttt/.local/share/Trash/files/PCLConfig.cmake")
find_package(PCL 1.3 REQUIRED COMPONENTS)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

但仍然有同样的错误。如何在我的系统中定位PCLConfig.cmake?谢谢

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-05-25 17:02:10

您应该为CMake指定PCL来查找它。

在终点站运行:

代码语言:javascript
运行
复制
$ locate PCLConfig.cmake

然后,将找到的文件夹(没有文件名)添加到您的CMakeLists中,如下所示:

代码语言:javascript
运行
复制
set(PCL_DIR "/found/folder/")
#change X.x to whatever version yo installed

Sidenote : /usr/share/ pcl -x.x是您的pcl文件夹的常用路径。

票数 4
EN

Stack Overflow用户

发布于 2020-01-19 01:43:41

当我遵循http://www.pointclouds.org/downloads/linux.html网站上提到的Ubuntu 18的步骤时,我也遇到了同样的问题。

您只需运行sudo apt安装libpcl-dev即可。

因为在发行版中没有提到仿生(http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu/dists/)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37441189

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档