hjwdzh / QuadriFlow

QuadriFlow: A Scalable and Robust Method for Quadrangulation
http://stanford.edu/~jingweih/papers/quadriflow/
Other
660 stars 76 forks source link

cmake cannot locate Eigen root folder correctly #46

Closed ghost closed 4 years ago

ghost commented 4 years ago

Following are the error messages when I ran cmake -G"Visual Studio 14 2015 Win64" ..:

-- No preference for use of exported Eigen CMake configuration set, and no hints for include directory provided. Defaulting to preferring an installed/exported Eigen CMake configuration if available. -- Failed to find installed Eigen CMake configuration, searching for Eigen build directories exported with CMake. -- Found exported Eigen build directory: D:/3rd-parties/eigen-3.3.7/build CMake Error at cmake/FindEigen.cmake:89 (message): Failed to find Eigen - Could not find file: D://include/eigen3/Eigen/src/Core/util/Macros.h containing version information in Eigen install located at: D://include/eigen3.

The cmake script has successfully found the exported Eigen build directory, but it seems that it then failed to assemble the correct path to Macros.h according to that. The root folder of Eigen is one level above the build directory, i.e., D:/3rd-parties/eigen-3.3.7. As a result, the correct filepath should be D:/3rd-parties/eigen-3.3.7/Eigen/src/Core/util/Macros.h, not D://include/eigen3/Eigen/.... So, could you please fix this issue in FindEigen.cmake? Thanks a lot.

My environment:

hjwdzh commented 4 years ago

Can you check why it locates the path to "D://include/eigen3/Eigen"? I think the FindEigen.cmake is a standard file and should not be casually changed.

mlikens commented 3 years ago

I changed line 115 in FindEigen.cmake to set(EIGEN_PREFER_EXPORTED_EIGEN_CMAKE_CONFIGURATION FALSE) and it fixed this issue for me

I also added a custom path to the list at line 190, however I am not sure this is necessary