找不到所需的'eigen3'

时间:2017-09-15 12:23:37

标签: cmake eigen3

按照安装步骤here尝试安装deepdetect 我在/ usr / include / eigen3上正确安装了特征 我正在尝试从源代码构建,但是当我使用

cmake ..

我收到此错误

Checking for one of the modules 'eigen3'
CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:578 
(message):
None of the required 'eigen3' found
Call Stack (most recent call first):
CMakeLists.txt:52 (pkg_search_module)

有人可以帮我解决这个问题吗?提前谢谢。

1 个答案:

答案 0 :(得分:0)

我猜失败的行是:

find_package(PkgConfig)
pkg_search_module(Eigen3 REQUIRED eigen3)

我不知道它是否曾经工作过,或者为什么他们这样做了,但我会试着给here on so描述的解决方案:

INCLUDE_DIRECTORIES ( "$ENV{EIGEN3_INCLUDE_DIR}" )

SET( EIGEN3_INCLUDE_DIR "$ENV{EIGEN3_INCLUDE_DIR}" )
IF( NOT EIGEN3_INCLUDE_DIR )
    MESSAGE( FATAL_ERROR "Please point the environment variable EIGEN3_INCLUDE_DIR to the include directory of your Eigen3 installation.")
ENDIF()
INCLUDE_DIRECTORIES ( "${EIGEN3_INCLUDE_DIR}" )