-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
73 lines (63 loc) · 1.3 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 3.12 FATAL_ERROR)
project (UnscentedKalmanFilterCA
VERSION 0.1.0.0
DESCRIPTION "Unscented Kalman Filter with uniform acceleration dynamic model."
LANGUAGES CXX
)
add_executable (${PROJECT_NAME})
find_package (OpenCV 4 REQUIRED
COMPONENTS
highgui
tracking
)
target_include_directories (${PROJECT_NAME}
PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src"
"${OpenCV_INCLUDE_DIRS}"
)
target_link_libraries (${PROJECT_NAME}
PRIVATE
${OpenCV_LIBS}
)
target_compile_options (${PROJECT_NAME}
PRIVATE
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>:
-Wall
-Wextra
-Wpedantic
-pedantic-errors
>
$<$<CXX_COMPILER_ID:MSVC>:
/Wall
/EHsc
/MP
>
$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<CONFIG:Debug>>:
/Zi
/MDd
>
$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<CONFIG:Release>>:
/MD
>
)
set (SOURCE_FILES
"./src/main.cpp"
"./src/motion_model.cpp"
"./src/motion_model.hpp"
"./src/sliding_vector.hpp"
)
source_group (TREE "${CMAKE_CURRENT_SOURCE_DIR}"
FILES
${SOURCE_FILES}
)
target_sources (${PROJECT_NAME}
PRIVATE
${SOURCE_FILES}
)
set_target_properties (${PROJECT_NAME}
PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
USE_FOLDERS ON
)