I am trying to build Ceres 1.13, which requires Eigen 3.3.7. Unfortunately the version of eigen that comes with Ubuntu 22.10 (via apt) is 3.4.0, which is not compatible. I've downloaded Eigen 3.3.7, but I can't figure out how to use CMake to build Ceres with it. I can't uninstall the system eigen because it is needed for other programs.
What I've tried:
- "Building" Eigen 3.3.7 with cmake and installing it to a separate directory.
- Making copies of FindEigen3.cmake and Eigen3Config.cmake as FindEigen.cmake and EigenConfig.cmake. Otherwise they don't get found, I presume because it it looking for Eigen, not Eigen3.
- Adding the path to Eigen 3.3.7 to CMAKE_PREFIX_PATH. It finds the right version of Eigen, but doesn't find the header files.
fatal error: Eigen/Core: No such file or directory - Adding the path to Eigen 3.3.7 to CMAKE_MODULES_PATH. CMake does not find Eigen 3.3.7 and uses 3.4.0, which fails.
- Using CMake to "build" Eigen and then install it to a separate directory, and then add that to CMAKE_MODULES_PATH.
I'm missing something, but I haven't been able to find out what. What do I need to do to compile Ceres with CMake with Eigen 3.3.7?