-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
32 lines (26 loc) · 990 Bytes
/
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
cmake_minimum_required(VERSION 3.5)
project(1_c_plus LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# find required opencv(找到了该库,才可用下面的相关变量)
find_package(OpenCV REQUIRED)
# add directory of opencv headers
include_directories(
/usr/local/include
${OpenCV_INCLUDE_DIRS}
)
# directory of opencv library
LINK_DIRECTORIES(${OpenCV_LIBRARY_DIRS})
add_executable(1_HelloWorld HelloWorld.cpp)
add_executable(2_StringInitial StringInitial.cpp)
add_executable(3_StringOperation StringOperation.cpp)
add_executable(4_TemplateDemo TemplateDemo.cpp)
add_executable(5_Mul_Param_Fun Mul_Param_Fun.cpp)
#######################################################
# BEGIN of 6_opencv_demo
# name of executable file and path of source file
add_executable(6_opencv_demo OpenCVDemo.cpp)
# opencv libraries
target_link_libraries(6_opencv_demo ${OpenCV_LIBS})
# END of 6_opencv_demo
#######################################################