cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
find_package(OpenCV REQUIRED)
##下面是输出信息
message(STATUS "Opnecv ;ibrary status: ")
message(STATUS "> version: ${OpenCV_VERSION} ")
message(STATUS "libraries: ${OpenCV_LIBS} ")
message(STATUS "> include: ${OpenCV_INCLUDE_DIRS} ")
# set project name, version and supported languages
project(
vscode_c_cpp
VERSION 0.1
LANGUAGES C CXX)
# executable
add_executable(Chapter1 src/Chapter1.cpp)
target_include_directories(Chapter1 PUBLIC)
target_link_libraries(Chapter1 ${OpenCV_LIBS})
CmakeLists配opencv最快方法(两步)
最新推荐文章于 2024-06-15 18:18:22 发布