From 9f8d067c72506dee3da3b06bf3a0c63b34ae8a71 Mon Sep 17 00:00:00 2001 From: raulmur Date: Fri, 13 Jan 2017 15:54:01 +0100 Subject: [PATCH] Add OpenCV 3 and Eigen 3.3 support --- CMakeLists.txt | 9 ++++++++- Thirdparty/g2o/g2o/solvers/linear_solver_eigen.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fadce0f29c..94edcbe371 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,14 @@ endif() LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules) -find_package(OpenCV 2.4.3 REQUIRED) +find_package(OpenCV 2.4.3 QUIET) +if(NOT OpenCV_FOUND) + find_package(OpenCV 3.0 QUIET) + if(NOT OpenCV_FOUND) + message(FATAL_ERROR "OpenCV > 2.4.3 not found.") + endif() +endif() + find_package(Eigen3 3.1.0 REQUIRED) find_package(Pangolin REQUIRED) diff --git a/Thirdparty/g2o/g2o/solvers/linear_solver_eigen.h b/Thirdparty/g2o/g2o/solvers/linear_solver_eigen.h index d61c633c71..1c2789afee 100644 --- a/Thirdparty/g2o/g2o/solvers/linear_solver_eigen.h +++ b/Thirdparty/g2o/g2o/solvers/linear_solver_eigen.h @@ -53,7 +53,7 @@ class LinearSolverEigen: public LinearSolver public: typedef Eigen::SparseMatrix SparseMatrix; typedef Eigen::Triplet Triplet; - typedef Eigen::PermutationMatrix PermutationMatrix; + typedef Eigen::PermutationMatrix PermutationMatrix; /** * \brief Sub-classing Eigen's SimplicialLDLT to perform ordering with a given ordering */