PCL-CMAKELIST书写格式

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)//cmake最小版本
find_package(PCL 1.3 REQUIRED COMPONENTS common io)//PCL本次编译必须包含common和io两个模块,如果需要包含所有模块,把components后面去掉
include_directories(${PCL_INCLUDE_DIRS})
link_libraries(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

add_executable( pcd pcd.cpp)
target_link_libraries(pcd ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES})//如果包含所有模块,将这两个库换成${PCL_LIBRARY_DIRS}
 
原文地址:https://www.cnblogs.com/excellentlhw/p/10776872.html