Kdevelop的cmakelists添加opencv

下面是CMakeLists.txt的具体内容

cmake_minimum_required(VERSION 2.6)
project(myorbdetector)

set( CMAKE_BUILD_TYPE "DEBUG" )
set( CMAKE_CXX_FLAGS "-std=c++11 -O3" )
# OpenCV
find_package( OpenCV REQUIRED )

add_executable(myorbdetector main.cpp)
target_link_libraries(myorbdetector ${OpenCV_LIBS})


install(TARGETS myorbdetector RUNTIME DESTINATION bin)
 

蓝色的两句是添加opencv需要的语句

你可能感兴趣的:(编程,C++)