Skip to content

Commit

Permalink
would fix: #618 #790 #795 (#871)
Browse files Browse the repository at this point in the history
  • Loading branch information
matlabbe authored May 30, 2022
1 parent 744c737 commit 8f8256c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ IF(WITH_QT)
ENDIF(QT4_FOUND OR Qt5_FOUND)
ENDIF(WITH_QT)

IF(NOT VTK_FOUND)
# Newest PCL versions won't set -DDISABLE_VTK
IF(NOT "${PCL_DEFINITIONS}" MATCHES "-DDISABLE_VTK")
SET(PCL_DEFINITIONS "${PCL_DEFINITIONS};-DDISABLE_VTK")
ENDIF()
ENDIF(NOT VTK_FOUND)

IF(WITH_TORCH)
FIND_PACKAGE(Torch QUIET)
IF(TORCH_FOUND)
Expand Down

3 comments on commit 8f8256c

@rlabs-oss
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which VTK and PCL should be used in the context of the changes above?

Warning: pcl 1.12.1_2 is already installed and up-to-date.
Warning: vtk 9.1.0_4 is already installed and up-to-date.
yet CMake Error at /opt/homebrew/share/pcl-1.12/PCLConfig.cmake:63 (message):
visualization is required but vtk was not found
Call Stack (most recent call first):
/opt/homebrew/share/pcl-1.12/PCLConfig.cmake:357 (pcl_report_not_found)
/opt/homebrew/share/pcl-1.12/PCLConfig.cmake:546 (find_external_library)
CMakeLists.txt:228 (FIND_PACKAGE)

@matlabbe
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error is fine if you are in the fourth case described here: #871 (comment)

If you set WITH_QT=false, visualization module won't be required.

@matlabbe
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was tested with on pcl binaries from ubuntu 18.04, 20.04 and 22.04. https://github.com/introlab/rtabmap/actions/runs/2408700482

Please sign in to comment.