在编译安装的时候出现如下问题,是Eigen3的Cmake依赖问题, 已经安装eigen3,但在项目的find_package(Eigen3 QUERIED)中,无法找到FindEigen3.Cmake.
CMake Error at loam_velodyne/CMakeLists.txt:13 (find_package): By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Eigen3", but CMake did not find one. Could not find a package configuration file provided by "Eigen3" with any of the following names: Eigen3Config.cmake eigen3-config.cmake Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set "Eigen3_DIR" to a directory containing one of the above files. If "Eigen3" provides a separate development package or SDK, be sure it has been installed.
解决方案:
1. 找到 FindEigen3.cmake。也可以使用 locate FindEigen3.cmake 命令来查找。
2. 复制到项目文件夹下面,或者放在新建的cmake 文件夹内。
3. 修改项目 CMakeLists.txt。
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) //添加此句 find_package(Eigen3 REQUIRED) find_package(PCL REQUIRED)
如果是放在新建的cmake文件夹下,则添加此句:
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
That's Done, then re catkin_make。
原文链接:https://www.freesion.com/article/2528371979/
翻译
搜索
复制
标签:FindEigen3,CMake,package,project,Eigen3,CMAKE,cmake,find From: https://www.cnblogs.com/rainbow70626/p/17642811.html