Created attachment 441 [details] eigen-cmake-config.patch The attached patch provides support for the cmake command find_package (Eigen 3.2) via eigen-config.cmake and eigen-config-version.cmake. This will be able to find Eigen either in the build tree (after "cmake SOURCE_DIR") or in the install tree (after "make install"). It sets Eigen_FOUND, Eigen_VERSION, and Eigen_INCLUDE_DIRS. This is a "config-style" lookup. If a user has a FindEigen.cmake in his path he might need to specify NO_MODULE.
The version matching rules implemented in eigen-config-version.cmake are find_package(Eigen 3) matches 3.* but not 2.* or 4.* find_package(Eigen 3.0) matches 3.* but not 2.* or 4.* find_package(Eigen 3.1) matches 3.1.*, 3.2.* but not 3.0.* or 4.* find_package(Eigen 3.2.1) matches 3.2.1, 3.2.2, 3.3.0 but not 3.2.0 or 4.* This assumes a version acceptable if the first version number matches and the version is greater or equal to the requested version. Perhaps the following rules would match more closely how versioning works with Eigen find_package(Eigen 3) matches 3.* only find_package(Eigen 3.0) matches 3.0.* only find_package(Eigen 3.2) matches 3.2.* only find_package(Eigen 3.2.1) matches 3.2.n for n>=1 but not 3.2.0 or 3.3.* I can easily modify the version checking to implement this. Let me know.
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/773.