-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
executable file
·60 lines (52 loc) · 1.61 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
cmake_minimum_required(VERSION 3.5.1)
project(HERORM2021)
set(CMAKE_CXX_STANDARD 11)
# 设置第三方库文件夹位置
set(OPENCV_DIR /usr/local/share/OpenCV)
# 搜索库
find_package(OpenCV REQUIRED)
# 添加源文件
add_executable(${PROJECT_NAME}
src/main.cpp
src/armor_detect/armordetector.cpp
src/armor_detect/armor/armor.cpp
src/armor_detect/classifier/classifier.cpp
src/camera/mvcamera/mvcamera.cpp
src/camera/dhcamera/dhcamera.cpp
src/communication/serialport.cpp
src/communication/cannode.cpp
src/target_solve/anglesolver.cpp
src/target_solve/targetsolver.cpp
src/util/timer/timer.cpp
src/util/debugger/debugger.cpp
src/util/util.cpp
src/energy/energy.cpp
src/workspace.cpp)
# 添加头文件目录
include_directories(
./src/
./src/armor_detect
./src/armor_detect/armor
./src/armor_detect/classifier
./src/armor_detect/classifier/darknet/include
./src/camera/
./src/camera/dhcamera
./src/camera/mvcamera
./src/communication
./src/target_solve
./src/util
./src/util/timer
./src/util/debugger
./src/energy
${OpenCV_INCLUDE_DIRS})
# 添加需要链接的库文件目录
link_directories(./src/armor_detect/classifier/darknet/)
# 添加链接库
target_link_libraries(${PROJECT_NAME}
${OpenCV_LIBRARIES}
libdarknet.so
-pthread
-lMVSDK
-lgxiapi
-fopenmp
/lib/libMVSDK.so)