Skip to content

Commit 6042a61

Browse files
committed
Move the setting of WITH_QT to AUTO to else block, if VTK is not used/found.
1 parent 5c3c2d7 commit 6042a61

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,12 @@ if(VTK_QT_VERSION STREQUAL "5")
430430
elseif(VTK_QT_VERSION STREQUAL "6")
431431
message(STATUS "VTK has found Qt6 - defaulting to same version.")
432432
set(WITH_QT "QT6" CACHE STRING "Build QT Front-End (AUTO|YES|QT6|QT5|NO)")
433+
else()
434+
# 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.
435+
set(WITH_QT "AUTO" CACHE STRING "Build QT Front-End (AUTO|YES|QT6|QT5|NO)")
433436
endif()
434-
435-
# 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.
436-
set(WITH_QT "AUTO" CACHE STRING "Build QT Front-End (AUTO|YES|QT6|QT5|NO)")
437437
set_property(CACHE WITH_QT PROPERTY STRINGS "AUTO" "YES" "QT6" "QT5" "NO")
438+
438439
if(WITH_QT)
439440
include("${PCL_SOURCE_DIR}/cmake/pcl_find_qt.cmake")
440441
endif()

0 commit comments

Comments
 (0)