-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (22 loc) · 1.46 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
cmake_minimum_required(VERSION 3.0) # CMake 最低版本要求
project( OpenCV_Lecture_1 ) # 项目名称
find_package( OpenCV 4 REQUIRED ) # 寻找 OpenCV 库
include_directories( ${OpenCV_INCLUDE_DIRS} ) # 包含 OpenCV 头文件
add_executable( read_write 1_read_write.cpp ) # 添加需要编译的文件
target_link_libraries( read_write ${OpenCV_LIBS} ) # 链接 OpenCV 库
add_executable( img_info 2_img_info.cpp ) # 添加需要编译的文件
target_link_libraries( img_info ${OpenCV_LIBS} ) # 链接 OpenCV 库
add_executable( split 3_split.cpp ) # 添加需要编译的文件
target_link_libraries( split ${OpenCV_LIBS} ) # 链接 OpenCV 库
add_executable( convert 4_convert.cpp ) # 添加需要编译的文件
target_link_libraries( convert ${OpenCV_LIBS} ) # 链接 OpenCV 库
add_executable( threshold 5_threshold.cpp ) # 添加需要编译的文件
target_link_libraries( threshold ${OpenCV_LIBS} ) # 链接 OpenCV 库
add_executable( inrange 6_inrange.cpp ) # 添加需要编译的文件
target_link_libraries( inrange ${OpenCV_LIBS} ) # 链接 OpenCV 库
add_executable( trackbar 7_trackbar.cpp ) # 添加需要编译的文件
target_link_libraries( trackbar ${OpenCV_LIBS} ) # 链接 OpenCV 库
add_executable( filter 8_filter.cpp ) # 添加需要编译的文件
target_link_libraries( filter ${OpenCV_LIBS} ) # 链接 OpenCV 库
add_executable( morph 9_morph.cpp ) # 添加需要编译的文件
target_link_libraries( morph ${OpenCV_LIBS} ) # 链接 OpenCV 库