-
Notifications
You must be signed in to change notification settings - Fork 33
/
CMakeLists.txt
156 lines (139 loc) · 5.69 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
project(PedestrianTracking)
cmake_minimum_required(VERSION 3.1)
find_package( OpenCV REQUIRED )
find_library( DARKNET_LIB darknet PATHS ${PROJECT_SOURCE_DIR}/data/yolo/lib )
#needs opencv_contrib
add_definitions(-DUSE_OCV_UKF)
add_definitions(-DUSE_OCV_KCF)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
configure_file(config.cfg config.cfg COPYONLY)
set(folder_source src/main.cpp
src/TrackerInterface.cpp
src/Properties.cpp
src/Detector/IBackgroundSubtractor.cpp
src/Detector/InceptionClassifierInterface.cpp
src/Detector/YoloInterface.cpp
src/Tracker/Ctracker.cpp
src/Tracker/HungarianAlg/HungarianAlg.cpp
src/Tracker/LocalTracker.cpp
src/Tracker/Kalman.cpp
src/ConfigLoader/ConfigFile.cpp)
set(folder_header
src/Utils.h
src/DetectorInterface.h
src/TrackerInterface.h
src/Detector/IBackgroundSubtractor.h
src/Detector/InceptionClassifierInterface.h
src/Detector/YoloInterface.h
src/Tracker/Ctracker.h
src/Tracker/track.h
src/Tracker/HungarianAlg/HungarianAlg.h
src/Tracker/LocalTracker.h
src/Tracker/Kalman.h
src/Tracker/defines.h
src/ConfigLoader/ConfigFile.h
src/Properties.h)
set(graph_source
src/Tracker/graph/tokenise.cpp
src/Tracker/graph/mytree.cpp
src/Tracker/graph/mygraph.cpp
src/Tracker/graph/mwbmatching.cpp
src/Tracker/graph/mincut.cpp
src/Tracker/graph/gport.cpp
src/Tracker/graph/fheap.c
)
set(graph_header
src/Tracker/graph/tokenise.h
src/Tracker/graph/mytree.h
src/Tracker/graph/mygraph.h
src/Tracker/graph/mwbmatching.h
src/Tracker/graph/mincut.h
src/Tracker/graph/gport.h
src/Tracker/graph/gdefs.h
src/Tracker/graph/fheap.h
)
set(gtl_source
src/Tracker/graph/GTL/src/bellman_ford.cpp
src/Tracker/graph/GTL/src/bfs.cpp
src/Tracker/graph/GTL/src/biconnectivity.cpp
src/Tracker/graph/GTL/src/bid_dijkstra.cpp
src/Tracker/graph/GTL/src/components.cpp
src/Tracker/graph/GTL/src/debug.cpp
src/Tracker/graph/GTL/src/dfs.cpp
src/Tracker/graph/GTL/src/dijkstra.cpp
src/Tracker/graph/GTL/src/edge.cpp
src/Tracker/graph/GTL/src/embedding.cpp
src/Tracker/graph/GTL/src/fm_partition.cpp
src/Tracker/graph/GTL/src/gml_parser.cpp
src/Tracker/graph/GTL/src/gml_scanner.cpp
src/Tracker/graph/GTL/src/graph.cpp
src/Tracker/graph/GTL/src/maxflow_ff.cpp
src/Tracker/graph/GTL/src/maxflow_pp.cpp
src/Tracker/graph/GTL/src/maxflow_sap.cpp
src/Tracker/graph/GTL/src/min_tree.cpp
src/Tracker/graph/GTL/src/node.cpp
src/Tracker/graph/GTL/src/planarity.cpp
src/Tracker/graph/GTL/src/pq_node.cpp
src/Tracker/graph/GTL/src/pq_tree.cpp
src/Tracker/graph/GTL/src/ratio_cut_partition.cpp
src/Tracker/graph/GTL/src/st_number.cpp
src/Tracker/graph/GTL/src/topsort.cpp
)
set(gtl_header
src/Tracker/graph/GTL/include/GTL/algorithm.h
src/Tracker/graph/GTL/include/GTL/bellman_ford.h
src/Tracker/graph/GTL/include/GTL/bfs.h
src/Tracker/graph/GTL/include/GTL/biconnectivity.h
src/Tracker/graph/GTL/include/GTL/bid_dijkstra.h
src/Tracker/graph/GTL/include/GTL/bin_heap.h
src/Tracker/graph/GTL/include/GTL/components.h
src/Tracker/graph/GTL/include/GTL/debug.h
src/Tracker/graph/GTL/include/GTL/dfs.h
src/Tracker/graph/GTL/include/GTL/dijkstra.h
src/Tracker/graph/GTL/include/GTL/edge.h
src/Tracker/graph/GTL/include/GTL/edge_data.h
src/Tracker/graph/GTL/include/GTL/edge_map.h
src/Tracker/graph/GTL/include/GTL/embedding.h
src/Tracker/graph/GTL/include/GTL/fm_partition.h
src/Tracker/graph/GTL/include/GTL/gml_parser.h
src/Tracker/graph/GTL/include/GTL/gml_scanner.h
src/Tracker/graph/GTL/include/GTL/graph.h
src/Tracker/graph/GTL/include/GTL/maxflow_ff.h
src/Tracker/graph/GTL/include/GTL/maxflow_pp.h
src/Tracker/graph/GTL/include/GTL/maxflow_sap.h
src/Tracker/graph/GTL/include/GTL/min_tree.h
src/Tracker/graph/GTL/include/GTL/ne_map.h
src/Tracker/graph/GTL/include/GTL/node.h
src/Tracker/graph/GTL/include/GTL/node_data.h
src/Tracker/graph/GTL/include/GTL/node_map.h
src/Tracker/graph/GTL/include/GTL/planarity.h
src/Tracker/graph/GTL/include/GTL/pq_node.h
src/Tracker/graph/GTL/include/GTL/pq_tree.h
src/Tracker/graph/GTL/include/GTL/ratio_cut_partition.h
src/Tracker/graph/GTL/include/GTL/st_number.h
src/Tracker/graph/GTL/include/GTL/symlist.h
src/Tracker/graph/GTL/include/GTL/topsort.h
src/Tracker/graph/GTL/include/GTL/version.h
src/Tracker/graph/GTL/include/GTL/GTL.h
)
SOURCE_GROUP("Source Files" FILES ${folder_source})
SOURCE_GROUP("Header Files" FILES ${folder_header})
SOURCE_GROUP("graph" FILES ${graph_source} ${graph_header})
SOURCE_GROUP("GTL" FILES ${gtl_source} ${gtl_header})
add_executable(${PROJECT_NAME} ${folder_source} ${folder_header} ${graph_source} ${graph_header} ${gtl_source} ${gtl_header})
target_link_libraries( ${PROJECT_NAME} ${OpenCV_LIBS} ${DARKNET_LIB} )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/Detector
${PROJECT_SOURCE_DIR}/src/Tracker
${PROJECT_SOURCE_DIR}/src/Tracker/HungarianAlg
${PROJECT_SOURCE_DIR}/src/Tracker/graph
${PROJECT_SOURCE_DIR}/src/Tracker/graph/GTL/include
${PROJECT_SOURCE_DIR}/data/yolo/include)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${PROJECT_SOURCE_DIR}/data/yolo/lib/libdarknet.so"
$<TARGET_FILE_DIR:${PROJECT_NAME}>)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${PROJECT_SOURCE_DIR}/data/yolo"
$<TARGET_FILE_DIR:${PROJECT_NAME}>)