cmake: prefer using Eigen configuration files#18699
cmake: prefer using Eigen configuration files#18699opencv-pushbot merged 1 commit intoopencv:3.4from
Conversation
| if(WITH_EIGEN AND NOT HAVE_EIGEN) | ||
| find_package(Eigen3 QUIET) | ||
| if(NOT OPENCV_SKIP_EIGEN_FIND_PACKAGE_CONFIG) | ||
| find_package(Eigen3 CONFIG QUIET) # Ceres 2.0.0 CMake scripts doesn't work with CMake's FindEigen3.cmake module (due to missing EIGEN3_VERSION_STRING) |
There was a problem hiding this comment.
Another option might be to adjust the FindEigen3.cmake module to be compatible with Eigen's own cmake config modules and by (additionally) setting EIGEN3_VERSION_STRING.
There was a problem hiding this comment.
FindEigen3.cmake is not a part of OpenCV.
It is part of CMake distributions on some platforms (like Fedora 31/32, check /usr/share/cmake/Modules/FindEigen3.cmake).
There was a problem hiding this comment.
Oh ok, sorry, I misinterpreted it. (Still you could set EIGEN3_VERSION_STRING here if it is unset). But maybe your proposed solution is good enough. The only case I can think of is if someone wants to build with ceres 2.0.0, but find Eigen in a way that works with the find module, but doesn't work with eigens own config module (maybe from an Eigen source tree directly, not build or install dir).
- for better compatibility with Ceres 2.0.0 CMake scripts
|
👍 |
opencv_contrib PR: opencv/opencv_contrib#2732
Compatibility with Ceres 2.0.0 CMake scripts
Related CMake message: