CMakeList.txt里添加OpenCV, Eigen, Ceres, G2O库

#添加OpenCV库,头文件
find_package(OpenCV REQUIRED)
include_directories(${OPENCV_INCLUDE_DIRS})
#添加Eigen库,头文件
find_package(Eigen3)
include_directories(${EIGEN3_INCLUDE_DIRS})
#添加Ceres库,头文件
find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})
#添加G2O库,头文件
LIST(APPEND CMAKE_MODULE_PATH /home/carl/g2o/cmake_modules)
SET(G2O_ROOT /home/carl/g2o)
find_package(G2O REQUIRED)
include_directories(${G2O_INCLUDE_DIRS})

add_executable(ceres_quxian main.cpp)

#链接库文件到工程
target_link_libraries(ceres_quxian ${OpenCV_LIBS} ${CERES_LIBRARIES} g2o_core g2o_stuff)

头文件

#include 
#include 

你可能感兴趣的:(opencv,webpack,人工智能)