ubuntu16.04升级到20.04后报错 By not providing “FindEigen.cmake“
编译问题:
CMake Error at modules/perception/lidar/CMakeLists.txt:14 (find_package):
By not providing "FindEigen.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Eigen", but
CMake did not find one.
Could not find a package configuration file provided by "Eigen" with any of
the following names:
EigenConfig.cmake
eigen-config.cmake
Add the installation prefix of "Eigen" to CMAKE_PREFIX_PATH or set
"Eigen_DIR" to a directory containing one of the above files. If "Eigen"
provides a separate development package or SDK, be sure it has been
installed.
CMakeLists.txt
由于此时是通过sudo apt install libeigen3-dev安装的,在/usr/lib/cmake下面会有eigen的cmake文件,需要将原find_package(Eigen REQUIRED)改为find_package(Eigen3 REQUIRED),这样就不会报找不到eigen了。