I am building VTKExamples standalone and I have noticed that I am getting the message: “VTKWikiExamples: Not building Qt examples”
There is no variable vtkGUISupportQt_LOADED being set in the VTK build.
I changed VTK_GROUP_ENABLE_QT:WANT to VTK_GROUP_ENABLE_QT:YES and got the same result.
Has there been a name change for vtkGUISupportQt_LOADED?
@bill From what I can see there is no longer a VTK_QT_VERSION variable:
vtkGUISupportQt_LOADED:
We have GUISupportQt
VTK_VERSION: 8.90.0
VTK_QT_VERSION:
VTKWikiExamples: Building Qt examples
CMake Error at /usr/local/share/cmake-3.13/Modules/FindQt4.cmake:1313 (message):
Found unsuitable Qt version "5.12.0" from
/home/amaclean/Qt/5.12.0/gcc_64/bin/qmake, this code requires Qt 4.x
Call Stack (most recent call first):
CMakeLists.txt:150 (find_package)
I also built VTK with VTK_GROUP_ENABLE_QT:WANT and VTK_GROUP_ENABLE_QT:YES, VTK_QT_VERSION remains empty.
In looking at VTK/Examples/GUI/Qt only Qt 5.x seems to be supported.
If it doesn’t then I thought this would work in the top-level CMakeLists.txt file:
if(vtkGUISupportQt_LOADED OR TARGET VTK::GUISupportQt)
message(STATUS "VTKWikiExamples: Building Qt examples")
if (VTK_VERSION VERSION_LESS "8.90.0")
if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4")
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# We have ui files, this will bring in the macro: qt5_wrap_ui
find_package(Qt5Widgets REQUIRED QUIET)
else()
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
endif()
else()
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt5Widgets REQUIRED QUIET)
endif()
add_subdirectory(src/Cxx/Qt)
else()
message(STATUS "VTKWikiExamples: Not building Qt examples")
endif()
# Is git lfs installed?
file(READ "${WikiExamples_SOURCE_DIR}/src/Testing/Data/GitLfsInstalled" data)
However I get undefined reference tomain’` when building the Qt tests.
@lorensen , I downloaded SideBySideRenderWindowsQt and got it building with a few modifications on Kubuntu. Here is the modifiedCMakeLists.txt (2.4 KB) file that works for VTK 8.90 and VTK 8.2, I also removed the deprecation warnings when using VTK 8.90. Knowing you, you may have already done this , however, if you haven’t, you may be able to create a template for the Qt files from this.
This should be if (TARGET VTK::GUISupportQt). The unprefixed name is only valid in a build of VTK itself; the namespace version is available everywhere.