gadomski / cpd

C++ implementation of the Coherent Point Drift point set registration algorithm.
http://www.gadom.ski/cpd
GNU General Public License v2.0
385 stars 122 forks source link

Eigen setup #153

Closed omiguelgomes closed 3 years ago

omiguelgomes commented 3 years ago

When trying to set up the project, include errors regarding Eigen pop-up. I have tried several different methods for the installation, but the same error keeps coming up. I downloaded the Eigen package to the source of the project, created a build folder inside of the Eigen package, and ran cmake .. followed by make install, inside of the build folder. Afterwards, I followed your installation guide for the project, which ran successfully. When trying to compile rigid.cpp (in the examples folder, using g++ rigid.cpp -o rigid), I receive an error stating Eigen/Dense: No such file or directory. I tried moving the Eigen folder to the include package, which yielded the same result. I am unsure whether there is something I am not doing right, or if it's something out of my control. Thank you!

gadomski commented 3 years ago

Correct me if I'm wrong, but it sounds like you were able to build the CPD libraries correctly, but just failed at building the example executable. Note that there is a CMakeLists.txt file inside of the examples directory, meaning that you can use CMake to build those examples as well. I would recommend doing that.

omiguelgomes commented 3 years ago

I'm truly sorry, I completely forgot about what I had tried earlier. I did try using the CmakeLists.txt file, but in this case, I got the following error:

By not providing "FindCpd.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Cpd", but
  CMake did not find one.

  Could not find a package configuration file provided by "Cpd" with any of
  the following names:

    CpdConfig.cmake
    cpd-config.cmake

  Add the installation prefix of "Cpd" to CMAKE_PREFIX_PATH or set "Cpd_DIR"
  to a directory containing one of the above files.  If "Cpd" provides a
  separate development package or SDK, be sure it has been installed.

setting the Cpd_DIR variable directly in the CMakeLists.txt yields errors in the cpd-config.cmake file stating Cpd::Library-C++ contains files that don't exist.

gadomski commented 3 years ago

Did you install CPD onto the system, e.g. with make install in the CPD build directory? The examples look for an installed copy of the CPD libraries and associated CMake config.

omiguelgomes commented 3 years ago

I apologize for my novice mistakes, I didn't have previous experience with CMake, and I only tried following your README. Your suggestions have solved my problems, thank you for your time. Best regards, Miguel Gomes

gadomski commented 3 years ago

No worries, good luck!