我想编译一个open project,它需要Eigen3,我遵循它的指导方针,但坚持这一步:
"将环境变量Eigen3_DIR设置为{YOUR_EIGEN3_DIRECTORY} / eigen3 / cmake。"
我已安装CMake gui,并在配置后打印出错误
Make Error at src/CMakeLists.txt:15 (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.
但我已从here下载了Eigen3,并按如下方式设置Eigen3_DIR
那么我该怎么做才能解决这个问题呢?我只是cmake的初学者。
答案 0 :(得分:0)
我假设您正在使用Windows。您将需要安装Visual Studio。您可以使用社区版本。您将需要执行以下操作:
这将在您的安装目录中创建Eigen3Config.cmake文件。在我的情况下,安装目录为“ C:\ Program Files(X86)\ Eigen3。将其用作Eigen3_DIR变量的值。 默认情况下,Eigen不随Eigen3Config.cmake文件一起提供。您将看到Eigen3Config.cmake.in文件。这用于构建Eigen3Config.cmake文件。
HTH