这是我的一部分CMakeLists.txt
set (VTK_DIR "/usr/include/vtk-5.8")
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
IF(VTK_FOUND)
message("found VTK. Version:" ${VTK_VERSION}. VTK_DIR: ${VTK_DIR})
ELSE(VTK_FOUND)
MESSAGE(FATAL_ERROR
"Cannot build the executable without VTK. Please set the
VTK_DIR")
ENDIF(VTK_FOUND)
cmake .
告诉我:
找到VTK。版本:6.0.0.VTK_DIR:/usr/local/lib/cmake/vtk-6.0
在命令行中给出 VTK_DIR 也无济于事:
cmake -DVTK_DIR:PATH=/usr/include/vtk-5.8 .
仍然 cmake 寻找/usr/local/lib/cmake/vtk-6.0
VTK。
这里有什么问题?