OpenCV的CMakeLists.txt的写法

当使用简单的opencv功能时,在程序中包含这两个头文件即可,相应的CmakeLists.txt的写法如下

PROJECT(main)
cmake_minimum_required(VERSION 2.7)

# OpenCV
find_package( OpenCV 3.1 REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )

ADD_EXECUTABLE(Test main.cpp)
target_link_libraries( Hello ${OpenCV_LIBS)

猜你喜欢

转载自blog.csdn.net/qq_34122731/article/details/91413631
今日推荐