You're right. We still have a few pending bugs and PR regarding these kinds of cmake issues, but with now crystal clear agreement on what should be done and how:
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1386 https://bitbucket.org/eigen/eigen/commits/52399ea56fa9e936bd936e47c8a356265ecbfa92#chg-CMakeLists.txt https://bitbucket.org/eigen/eigen/pull-requests/299/avoid-use-of-build-directory/diff I also remember having suggested to add a default Eigen3Config.cmake file at the root of Eigen's source tree so that a "hg clone", "git clone", "wget && tar xzf", etc. is enough to make find_package(Eigen) happy. But I've been told this is bad practice... don't remember why... gael On Mon, Mar 11, 2019 at 1:14 PM Bill Greene <[email protected]> wrote: > 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? > > Thanks. >
