Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,19 @@ if(WITH_VTK)
endif()
endif()

# VTK can depend on Qt and search for its required version, so search after so we can overwrite Qt5_FOUND/Qt6_FOUND if the version we require is not found.
set(WITH_QT "AUTO" CACHE STRING "Build QT Front-End (AUTO|YES|QT6|QT5|NO)")
# If VTK has found a Qt version, default to the same version
if(VTK_QT_VERSION STREQUAL "5")
message(STATUS "VTK has found Qt5 - defaulting to same version.")
set(WITH_QT "QT5" CACHE STRING "Build QT Front-End (AUTO|YES|QT6|QT5|NO)")
elseif(VTK_QT_VERSION STREQUAL "6")
message(STATUS "VTK has found Qt6 - defaulting to same version.")
set(WITH_QT "QT6" CACHE STRING "Build QT Front-End (AUTO|YES|QT6|QT5|NO)")
else()
# VTK can depend on Qt and search for its required version, so search after so we can overwrite Qt5_FOUND/Qt6_FOUND if the version we require is not found.
set(WITH_QT "AUTO" CACHE STRING "Build QT Front-End (AUTO|YES|QT6|QT5|NO)")
endif()
set_property(CACHE WITH_QT PROPERTY STRINGS "AUTO" "YES" "QT6" "QT5" "NO")

if(WITH_QT)
include("${PCL_SOURCE_DIR}/cmake/pcl_find_qt.cmake")
endif()
Expand Down