Ubuntu编译找不到eigen3的解决方法

之前在编译lsd_slam的时候报错

CMake Error atCMakeLists.txt:23 (find_package):

By not providing"FindEigen3.cmake" in CMAKE_MODULE_PATH this project has

asked CMake tofind a package configuration file provided by "Eigen3", but

CMake did not findone.

Could not find apackage configuration file provided by "Eigen3" with any

of the followingnames:

Eigen3Config.cmake

eigen3-config.cmake

Add theinstallation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set

"Eigen3_DIR"to a directory containing one of the above files. If "Eigen3"

provides aseparate development package or SDK, be sure it has been

installed.


解决方法

在主文件夹下直接查找FindEigen3.cmake文件,然后把它复制到报错的CMakeLists.txt对应的路径下,在CMakeLists.txt中添加

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})

include_directories($ {EIGEN3_INCLUDE_DIRS})

然后重新编译就好.



你可能感兴趣的:(Ubuntu编译找不到eigen3的解决方法)