ubuntu16.04 clion调用opencv2.4.13

在CMakeList.txt中添加opencv,以及禁用CUDA。

cmake_minimum_required(VERSION 3.6)
project(opencvTest)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CUDA_USE_STATIC_CUDA_RUNTIME OFF) #禁用CUDA
set(SOURCE_FILES main.cpp)
find_package(OpenCV REQUIRED) #查找opencv包
add_executable(opencvTest ${SOURCE_FILES} )
target_link_libraries(opencvTest ${OpenCV_LIBS}) #加入opencv lib


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