CMake 使用 OpenCV

文章目录

  • CMake 使用 OpenCV
    • 添加 OpenCV 系统路径
    • 头文件
    • 尽情享用吧~

CMake 使用 OpenCV

添加 OpenCV 系统路径

set(OpenCV_DIR "/share/OpenCV")
find_package(OpenCV REQUIRED)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
SET(OpenCV_LIBRARIES ${OpenCV_LIBS})

target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS} )

头文件

#include 

尽情享用吧~

你可能感兴趣的:(linux,win,opencv)