-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
56 lines (45 loc) · 1.53 KB
/
Copy pathCMakeLists.txt
File metadata and controls
56 lines (45 loc) · 1.53 KB
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
cmake_minimum_required(VERSION 3.10)
project(HailoYOLO26_Pi5_Pipeline CXX)
# HailoRT and modern tracking libraries require C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# ==========================================
# 1. Find System Dependencies
# ==========================================
# Find OpenCV
find_package(OpenCV REQUIRED)
# Find HailoRT (Installed via the official .deb packages)
find_library(HAILORT_LIB NAMES hailort REQUIRED)
# Find Roboflow Trackers
# Searching for the specific 'roboflow_trackers' library installed on the system
find_library(TRACKERS_LIB NAMES roboflow_trackers REQUIRED)
# ==========================================
# 2. Configure Include Directories
# ==========================================
# Point to the cpp/include folder from the root
include_directories(
cpp/include
${OpenCV_INCLUDE_DIRS}
)
# ==========================================
# 3. Build Executables
# ==========================================
# -- A. Single Image Detection --
add_executable(detect_image cpp/src/detect_image.cpp)
target_link_libraries(detect_image
${OpenCV_LIBS}
${HAILORT_LIB}
)
# -- B. Real-Time Video Detection --
add_executable(detect_video cpp/src/detect_video.cpp)
target_link_libraries(detect_video
${OpenCV_LIBS}
${HAILORT_LIB}
)
# -- C. Real-Time Video Tracking (BoTSORT) --
add_executable(track_video cpp/src/track_video.cpp)
target_link_libraries(track_video
${OpenCV_LIBS}
${HAILORT_LIB}
${TRACKERS_LIB} # External roboflow_trackers library linked here
)