MarkMuth / QtKittiVisualizer

166 stars 62 forks source link

cmake error - Eigen #8

Closed ShaharSarShalom closed 2 years ago

ShaharSarShalom commented 5 years ago

I'm trying to compile the QtKittiVisualizer, I'm not a linux expert so please be gentle with me.

  1. I started by compiling the PCL library.

  2. Then I compiled the eigen (3.1) library (Since I saw that QtKittiVisualizer needs it)

  3. Then I tried to create a make file for QtKittiVisualizer using cmake. I get the error below (this also includes an output image)

** I placed that path to the of eigen compilation output to Eigen_Dir, However it still doesn't work.

This might have nothing to do with QtKittiVisualizer, Do you have any suggestions how to solve this and continue on with QtKittiVisualizer compilation ?

`CMake Warning at /home/iaiai/Documents/Shahar/PointCloudClassificaiton/Tools/PCL/BUILDOUTPUT/PCLConfig.cmake:148 (find_package): By not providing "FindEigen.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Eigen", but CMake did not find one.

Could not find a package configuration file provided by "Eigen" (requested version 3.1) with any of the following names:

EigenConfig.cmake
eigen-config.cmake

Screenshot from 2019-04-16 09-50-00

Add the installation prefix of "Eigen" to CMAKE_PREFIX_PATH or set "Eigen_DIR" to a directory containing one of the above files. If "Eigen" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): /home/iaiai/Documents/Shahar/PointCloudClassificaiton/Tools/PCL/BUILDOUTPUT/PCLConfig.cmake:302 (find_eigen) /home/iaiai/Documents/Shahar/PointCloudClassificaiton/Tools/PCL/BUILDOUTPUT/PCLConfig.cmake:531 (find_external_library) CMakeLists.txt:40 (find_package)

CMake Error at /home/iaiai/Documents/Shahar/PointCloudClassificaiton/Tools/PCL/BUILDOUTPUT/PCLConfig.cmake:56 (message): common is required but eigen was not found Call Stack (most recent call first): /home/iaiai/Documents/Shahar/PointCloudClassificaiton/Tools/PCL/BUILDOUTPUT/PCLConfig.cmake:351 (pcl_report_not_found) /home/iaiai/Documents/Shahar/PointCloudClassificaiton/Tools/PCL/BUILDOUTPUT/PCLConfig.cmake:531 (find_external_library) CMakeLists.txt:40 (find_package)`

MarkMuth commented 2 years ago

It seems like PCL requires Eigen. It finds it when you compile it, but it won't find it if you include it in another project like QtKittiVisualizer. The only workaround I could find was to copy the FindEigen.cmake from the PCL source code point CMake to it using the CMAKE_MODULE_PATH. Please refer to the latest changes in the CMakeLists.txt file.

joedavid-tuni commented 2 months ago

It seems like PCL requires Eigen. It finds it when you compile it, but it won't find it if you include it in another project like QtKittiVisualizer. The only workaround I could find was to copy the FindEigen.cmake from the PCL source code point CMake to it using the CMAKE_MODULE_PATH. Please refer to the latest changes in the CMakeLists.txt file.

which is done by set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};path_to_pcl-pcl-1.13.0/cmake/Modules") in your CMakeLists.txt