Windows下CMake配置PCL库,编译记录

1. 找不到VTK_DIR

CMake Error at D:/Program Files/PCL 1.8.1/cmake/PCLConfig.cmake:44 (message):
visualization is required but vtk was not found
Call Stack (most recent call first):
D:/Program Files/PCL 1.8.1/cmake/PCLConfig.cmake:683 (pcl_report_not_found)
D:/Program Files/PCL 1.8.1/cmake/PCLConfig.cmake:844 (find_external_library)
CMakeLists.txt:5 (find_package)

Solution:

if you installed PCL using the all-in-one Installer for Win32, You should specify “Visual Studio 14 2015” in CMake.
If you installed PCL using the all-in-one Installer for Win64, You should specify “Visual Studio 14 2015 Win64” in CMake.

So, 选择编译器的是时候要格外注意,安装64位PCL,选择“Visual Studio 14 2015”为Generator时,会出现以上错误,则删除编译文件,重新选择编译路径,选择“Visual Studio 14 2015 Win64”即可,则可自动找到VTK_DIR, 显示Configure done.

你可能感兴趣的:(Windows下CMake配置PCL库,编译记录)