cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(Measure_Size)
#OpenCv
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
#PCL
find_package(PCL 1.2 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(Measure_Size Measure_Size.cpp)
target_link_libraries(Measure_Size ${PCL_LIBRARIES} ${OpenCV_LIBS})
set(CMAKE_BUILD_TYPE Debug)
project(Measure_Size)
#OpenCv
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
#PCL
find_package(PCL 1.2 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(Measure_Size Measure_Size.cpp)
target_link_libraries(Measure_Size ${PCL_LIBRARIES} ${OpenCV_LIBS})
set(CMAKE_BUILD_TYPE Debug)

本文介绍如何使用CMake配置OpenCV和PCL库,实现计算机视觉和点云处理项目的集成。通过示例展示了必要的CMake指令,包括查找库、包含目录、链接库等步骤。
871

被折叠的 条评论
为什么被折叠?



