Eigen3Config.cmake 丢失
我正在尝试安装一个依赖于 Eigen 库的库。我在 Windows 10 中使用 Cmake 3.23.0-rc2 时遇到的错误。我得到这个
CMake Error at CMakeLists.txt:25 (FIND_PACKAGE):
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.
There are no Eigen3Config.cmake
eigen3-config.cmake
in Eigen library 我正在使用版本 3.2.4。由于这是一个仅包含标头的库,因此我没有在 Windows 10 中进行任何配置。一些人 建议添加这一行
list(APPEND CMAKE_MODULE_PATH "<path to eigen>/cmake")
但这并没有解决我的问题。这是 CMakeLists.txt
中的部分
CMAKE_MINIMUM_REQUIRED(VERSION 3.4)
if(WIN32)
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
FIND_PACKAGE(Eigen3 CONFIG REQUIRED)
INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR})
endif()
添加 Eigen 文件夹的路径并没有解决问题。
I'm trying to install a library which relies on Eigen library. The error I'm getting in Windows 10 using Cmake 3.23.0-rc2. I'm getting this
CMake Error at CMakeLists.txt:25 (FIND_PACKAGE):
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.
There are no Eigen3Config.cmake
eigen3-config.cmake
in Eigen library I'm using version 3.2.4. Since this is a header-only library, I didn't do any configuration in Windows 10. Some people suggest to add this line
list(APPEND CMAKE_MODULE_PATH "<path to eigen>/cmake")
But it didn't solve my problem. This is the part in CMakeLists.txt
CMAKE_MINIMUM_REQUIRED(VERSION 3.4)
if(WIN32)
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
FIND_PACKAGE(Eigen3 CONFIG REQUIRED)
INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR})
endif()
Adding path to the Eigen folder didn't solve the problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论