aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Silvio Traversaro <pegua1@gmail.com>2016-07-29 08:59:38 +0000
committerGravatar Silvio Traversaro <pegua1@gmail.com>2016-07-29 08:59:38 +0000
commit5e51a361fee067fb07f41f926721539a0f3d5965 (patch)
treeb3c474727383b01939e9af93870ed594bde3221a /cmake
parent4057f9b1fce05fef4730fa6b4bfe1b84a1f44973 (diff)
Modify FindEigen3.cmake to find Eigen3Config.cmake
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindEigen3.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/FindEigen3.cmake b/cmake/FindEigen3.cmake
index cea1afeab..3d5b486e3 100644
--- a/cmake/FindEigen3.cmake
+++ b/cmake/FindEigen3.cmake
@@ -35,6 +35,11 @@ if(NOT Eigen3_FIND_VERSION)
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
endif(NOT Eigen3_FIND_VERSION)
+# search first if an Eigen3Config.cmake is available in the system,
+# if successful this would set EIGEN3_INCLUDE_DIR and the rest of
+# the script will work as usual
+find_package(Eigen3 ${Eigen3_FIND_VERSION} NO_MODULE QUIET)
+
macro(_eigen3_check_version)
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)