-
Notifications
You must be signed in to change notification settings - Fork 20
/
CMakeLists.txt
38 lines (29 loc) · 945 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
33
34
35
36
37
38
CMAKE_MINIMUM_REQUIRED(VERSION 3.16)
# Set project name
project(botsort_tracker_example VERSION 0.1.0 LANGUAGES CXX)
# Build options
option(BUILD_EXAMPLES "Build examples" ON)
# Set Build Type if not set
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
"MinSizeRel" "RelWithDebInfo")
endif()
# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Set install directories
set(CMAKE_INSTALL_BINDIR bin)
set(CMAKE_INSTALL_LIBDIR lib)
set(CMAKE_INSTALL_INCLUDEDIR include)
# Check OpenCV and Eigen3
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
# add botsort
add_subdirectory(botsort)
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()