首先是编写好的CMakeLists.txt文件
cmake_minimum_required(VERSION 3.16)
project(opencv_test)
set(CMAKE_CXX_STANDARD 11)
find_package(OpenCV REQUIRED)
add_executable(opencv_test main.cpp) #readvideo basic_operations encap_functions my_armor
target_link_libraries(opencv_test ${
OpenCV_LIBS})
后面依次解释上面的代码