[eigen] Using Eigen in a project built with CMake

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

I am trying to create a CMakeLists.txt file for a project that requires Eigen.
A complication is that I would like this CMake build to work in the cases where
Eigen has been installed and when it has simply been unpacked into a directory
tree (this is the way I normally use Eigen).

I have read this doc: https://eigen.tuxfamily.org/dox/TopicCMakeGuide.html

But it appears to me that this approach works only for the installed case because
Eigen3Config.cmake doesn't exist until Eigen is installed.

On the other hand, the un-installed Eigen source tree contains the file FindEigen3.cmake
which can be found by cmake find_package in module mode. But FindEigen3.cmake
isn't copied to the directory tree by the installation process.

As a consequence, my CMakeLists.txt file requires some rather convoluted logic
to support both cases. Am I understanding the current situation correctly?


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/