-
Notifications
You must be signed in to change notification settings - Fork 43
/
CMakeLists.txt
executable file
·73 lines (58 loc) · 1.55 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
cmake_minimum_required(VERSION 2.8.12)
project(yolov3_pytorch_ros)
find_package(catkin REQUIRED
COMPONENTS
geometry_msgs
sensor_msgs
std_msgs
message_generation)
catkin_python_setup()
add_message_files(
FILES
BoundingBox.msg
BoundingBoxes.msg
)
generate_messages(
DEPENDENCIES
geometry_msgs
sensor_msgs
std_msgs
)
catkin_package()
catkin_install_python(
PROGRAMS src/${PROJECT_NAME}/detector.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY src/${PROJECT_NAME}/models
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY src/${PROJECT_NAME}/utils
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY config
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY models
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY classes
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
# add something that depends on above script so it runs
add_custom_target(
DownloadWeights ALL)
# download yolov3 weights
add_custom_command(TARGET DownloadWeights
PRE_BUILD
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/models/download_yolov3_weights.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/models
COMMENT "YOLOv3 weights")
# download yolov3-tiny weights
add_custom_command(TARGET DownloadWeights
PRE_BUILD
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/models/download_yolov3-tiny_weights.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/models
COMMENT "YOL0v3 tiny weights")