Correct, find_package(vtk) is not working on this machine. I built vtk-8.2 from source, followed by ‘make install’ which put code in /usr/local/include/vtk-8.2, and libraries in /usr/local/lib. Yet find_package() does not find the include directory.
Which returns VTK_FOUND=1 and VTK_LIBRARIES, but VTK_INCLUDE_DIRS is blank:
VTK_FOUND: 1
VTK_INCLUDE_DIRS:
VTK_LIBRARIES: VTK::WrappingTools;VTK::ViewsQt;VTK::ViewsInfovis;VTK::CommonColor;VTK::ViewsContext2D;VTK::loguru;VTK::TestingRendering;VTK::TestingCore;VTK::vtksys;VTK::RenderingQt;VTK::PythonCon (et cetera...)
When I use --debug-find to cmake, there is a lot of output from find_package(VTK), most of which I don’t understand. But no obvious error in there.
I do see file /usr/local/lib/cmake/vtk-8.2, which contains many *.cmake files. But I don’t see a corresponding /usr/local/include/cmake directory, despite the presence of /usr/local/include/vtk-8.2.
This is VTK 9, not 8.2 (or the 8.90 pre-release era). I have no idea why it thinks it is 8.2 here. What is ${VTK_VERSION}? VTK 8.90 and newer do not have any include directories provided as a variable because they are not needed. The targets provide the usage requirements, so all you need to do is target_link_libraries(mytgt ${vis} VTK::CommonCore) for whatever modules you need to use.