File ceres-solver-eigen-cmake.patch of Package ceres-solver
diff -Naur a/cmake/CeresConfig.cmake.in b/cmake/CeresConfig.cmake.in
--- a/cmake/CeresConfig.cmake.in 2018-07-10 16:48:23.000000000 -0500
+++ b/cmake/CeresConfig.cmake.in 2018-07-16 19:21:01.281431658 -0500
@@ -163,7 +163,7 @@
# Eigen.
# Flag set during configuration and build of Ceres.
-set(CERES_EIGEN_VERSION @EIGEN_VERSION@)
+set(CERES_EIGEN_VERSION @EIGEN3_VERSION@)
set(EIGEN_WAS_BUILT_WITH_CMAKE @FOUND_INSTALLED_EIGEN_CMAKE_CONFIGURATION@)
# Append the locations of Eigen when Ceres was built to the search path hints.
if (EIGEN_WAS_BUILT_WITH_CMAKE)
@@ -176,13 +176,13 @@
# search should be for an exact match, but for usability reasons do a soft
# match and reject with an explanation below.
find_package(Eigen ${CERES_EIGEN_VERSION} QUIET)
-if (EIGEN_FOUND)
- if (NOT EIGEN_VERSION VERSION_EQUAL CERES_EIGEN_VERSION)
+if (EIGEN3_FOUND)
+ if (NOT EIGEN3_VERSION VERSION_EQUAL CERES_EIGEN_VERSION)
# CMake's VERSION check in FIND_PACKAGE() will accept any version >= the
# specified version. However, only version = is supported. Improve
# usability by explaining why we don't accept non-exact version matching.
ceres_report_not_found("Found Eigen dependency, but the version of Eigen "
- "found (${EIGEN_VERSION}) does not exactly match the version of Eigen "
+ "found (${EIGEN3_VERSION}) does not exactly match the version of Eigen "
"Ceres was compiled with (${CERES_EIGEN_VERSION}). This can cause subtle "
"bugs by triggering violations of the One Definition Rule. See the "
"Wikipedia article http://en.wikipedia.org/wiki/One_Definition_Rule "
@@ -190,11 +190,11 @@
endif ()
message(STATUS "Found required Ceres dependency: "
"Eigen version ${CERES_EIGEN_VERSION} in ${EIGEN_INCLUDE_DIRS}")
-else (EIGEN_FOUND)
+else (EIGEN3_FOUND)
ceres_report_not_found("Missing required Ceres "
"dependency: Eigen version ${CERES_EIGEN_VERSION}, please set "
"EIGEN_INCLUDE_DIR.")
-endif (EIGEN_FOUND)
+endif (EIGEN3_FOUND)
# Glog.
# Flag set during configuration and build of Ceres.