还会提示The following configuration files were considered but not accepted 。
一开始还以为是自己安装的VTK有问题。但是检查之后发现正常安装,然后还在cmakelists里面添加库查找路径,如下图。结果还是不行。。。
find_package(Qt5 COMPONENTS Widgets REQUIRED)
set(VTK_DIR "C:/VTK9.0/install/lib/cmake/vtk-9.0")
find_package(VTK REQUIRED)
message("vtk message:" ${VTK_INDCLUDE_DIRS})
结果反复检查发现是这个项目设置的编译器为32bit,我的VTK和环境全都是64bit的,所以这里要选择成下面的MSVC2017 64bit(红色圈内为错误的哈)