mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
cmake: added VTK_GLOBAL_WARNING_DISPLAY option (default off) for VTK>=9 (https://github.com/introlab/rtabmap_ros/issues/1111)
This commit is contained in:
@@ -294,14 +294,20 @@ SET(ADD_VTK_GUI_SUPPORT_QT_TO_CONF FALSE)
|
||||
IF(WITH_QT)
|
||||
FIND_PACKAGE(VTK)
|
||||
IF(NOT VTK_FOUND)
|
||||
MESSAGE(FATAL_ERROR "VTK is required when using Qt. Set -DWITH_QT=OFF if you don't want gui tools.")
|
||||
MESSAGE(FATAL_ERROR "VTK is required when using Qt. Set -DWITH_QT=OFF if you don't want gui tools.")
|
||||
ENDIF(NOT VTK_FOUND)
|
||||
|
||||
# If Qt is here, the GUI will be built
|
||||
IF(NOT(${VTK_MAJOR_VERSION} LESS 9))
|
||||
IF(NOT VTK_QT_VERSION)
|
||||
MESSAGE(FATAL_ERROR "WITH_QT option is ON, but VTK ${VTK_MAJOR_VERSION} has not been built with Qt support, disabling Qt.")
|
||||
ENDIF()
|
||||
IF(NOT VTK_QT_VERSION)
|
||||
MESSAGE(FATAL_ERROR "WITH_QT option is ON, but VTK ${VTK_MAJOR_VERSION} has not been built with Qt support, disabling Qt.")
|
||||
ENDIF()
|
||||
|
||||
option(VTK_GLOBAL_WARNING_DISPLAY "Show VTK warning display on runtime" OFF)
|
||||
IF(NOT VTK_GLOBAL_WARNING_DISPLAY)
|
||||
ADD_DEFINITIONS(-DVTK_GLOBAL_WARNING_DISPLAY_OFF)
|
||||
ENDIF()
|
||||
|
||||
MESSAGE(STATUS "VTK>=9 detected, will use VTK_QT_VERSION=${VTK_QT_VERSION} for Qt version.")
|
||||
IF(${VTK_QT_VERSION} EQUAL 6)
|
||||
FIND_PACKAGE(Qt6 COMPONENTS Widgets Core Gui OpenGL PrintSupport QUIET OPTIONAL_COMPONENTS Svg)
|
||||
|
||||
Reference in New Issue
Block a user