标签:aries names repos processor repr HERE repo xxx mon
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(MY_GRAND_PROJECT)
find_package(PCL 1.3 REQUIRED COMPONENTS common io)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(pcd_write_test pcd_write.cpp)
target_link_libraries(pcd_write_test ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES})
We are requesting to find the PCL package at minimum version 1.3. We also says that it is REQUIRED meaning that cmake will fail gracefully if it can’t be found. As PCL is modular one can request:
only one component: find_package(PCL 1.3 REQUIRED COMPONENTS io)
several: find_package(PCL 1.3 REQUIRED COMPONENTS io common)
all existing: find_package(PCL 1.3 REQUIRED)
注:为了方便,用的是全部模块
find_package(PCL 1.7 REQUIRED)
When PCL is found, several related variables are set:
PCL_FOUND: set to 1 if PCL is found, otherwise unset
PCL_INCLUDE_DIRS: set to the paths to PCL installed headers and the dependency headers
PCL_LIBRARIES: set to the file names of the built and installed PCL libraries
PCL_LIBRARY_DIRS: set to the paths to where PCL libraries and 3rd party dependencies reside
PCL_VERSION: the version of the found PCL
PCL_COMPONENTS: lists all available components
PCL_DEFINITIONS: lists the needed preprocessor definitions and compiler flags
set(PCL_DIR "/path/to/PCLConfig.cmake")
before this one:
find_package(PCL 1.3 REQUIRED COMPONENTS common io)
...
http://www.pointclouds.org/documentation/tutorials/using_pcl_pcl_config.php#using-pcl-pcl-config
pcl之using pcl in your own project
标签:aries names repos processor repr HERE repo xxx mon
原文地址:https://www.cnblogs.com/ChrisCoder/p/9986362.html