-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
107 lines (88 loc) · 5.22 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
cmake_minimum_required(VERSION 2.6)
project(kalman-cpp)
if (CMAKE_GENERATOR MATCHES "Visual Studio")
# Do Visual Studio specific stuff
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ../bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ../bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ../bin)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_BUILD_TYPE Debug)
link_directories(${CMAKE_SOURCE_DIR}/windows-libs)
add_library (kalman-cpp ./kalman/kf.cpp ./kalman/ekf.cpp ./kalman/ekf2.cpp ./kalman/ukf.cpp ./kalman/fx.cpp)
target_include_directories (kalman-cpp PUBLIC ./kalman ./windows-libs/armadillo/include)
add_executable(demo1 ./samples/main1.cpp)
add_executable(demo2 ./samples/main2.cpp)
add_executable(demo3 ./samples/main3.cpp)
add_executable(demo4 ./samples/main4.cpp)
add_executable(demo5 ./samples/main5.cpp)
add_executable(demo6 ./samples/main6.cpp)
add_executable(demo7 ./samples/main7.cpp)
add_executable(demo8 ./samples/main8.cpp)
add_executable(demo9 ./samples/main9.cpp)
add_executable(demo10 ./samples/main10.cpp)
add_executable(demo11 ./samples/main11.cpp)
install(TARGETS demo1 RUNTIME DESTINATION ../bin)
install(TARGETS demo2 RUNTIME DESTINATION ../bin)
install(TARGETS demo3 RUNTIME DESTINATION ../bin)
install(TARGETS demo4 RUNTIME DESTINATION ../bin)
install(TARGETS demo5 RUNTIME DESTINATION ../bin)
install(TARGETS demo6 RUNTIME DESTINATION ../bin)
install(TARGETS demo7 RUNTIME DESTINATION ../bin)
install(TARGETS demo8 RUNTIME DESTINATION ../bin)
install(TARGETS demo9 RUNTIME DESTINATION ../bin)
install(TARGETS demo10 RUNTIME DESTINATION ../bin)
install(TARGETS demo11 RUNTIME DESTINATION ../bin)
target_link_libraries (demo1 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
target_link_libraries (demo2 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
target_link_libraries (demo3 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
target_link_libraries (demo4 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
target_link_libraries (demo5 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
target_link_libraries (demo6 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
target_link_libraries (demo7 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
target_link_libraries (demo8 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
target_link_libraries (demo9 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
target_link_libraries (demo10 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
target_link_libraries (demo11 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12)
else()
# Other stuff
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ../bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ../bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ../bin)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_BUILD_TYPE Debug)
add_library (kalman-cpp ./kalman/kf.cpp ./kalman/ekf.cpp ./kalman/ekf2.cpp ./kalman/ukf.cpp ./kalman/fx.cpp)
target_include_directories (kalman-cpp PUBLIC ./kalman)
add_executable(demo1 ./samples/main1.cpp)
add_executable(demo2 ./samples/main2.cpp)
add_executable(demo3 ./samples/main3.cpp)
add_executable(demo4 ./samples/main4.cpp)
add_executable(demo5 ./samples/main5.cpp)
add_executable(demo6 ./samples/main6.cpp)
add_executable(demo7 ./samples/main7.cpp)
add_executable(demo8 ./samples/main8.cpp)
add_executable(demo9 ./samples/main9.cpp)
add_executable(demo10 ./samples/main10.cpp)
add_executable(demo11 ./samples/main11.cpp)
install(TARGETS demo1 RUNTIME DESTINATION ../bin)
install(TARGETS demo2 RUNTIME DESTINATION ../bin)
install(TARGETS demo3 RUNTIME DESTINATION ../bin)
install(TARGETS demo4 RUNTIME DESTINATION ../bin)
install(TARGETS demo5 RUNTIME DESTINATION ../bin)
install(TARGETS demo6 RUNTIME DESTINATION ../bin)
install(TARGETS demo7 RUNTIME DESTINATION ../bin)
install(TARGETS demo8 RUNTIME DESTINATION ../bin)
install(TARGETS demo9 RUNTIME DESTINATION ../bin)
install(TARGETS demo10 RUNTIME DESTINATION ../bin)
install(TARGETS demo11 RUNTIME DESTINATION ../bin)
target_link_libraries (demo1 LINK_PUBLIC kalman-cpp armadillo)
target_link_libraries (demo2 LINK_PUBLIC kalman-cpp armadillo)
target_link_libraries (demo3 LINK_PUBLIC kalman-cpp armadillo)
target_link_libraries (demo4 LINK_PUBLIC kalman-cpp armadillo)
target_link_libraries (demo5 LINK_PUBLIC kalman-cpp armadillo)
target_link_libraries (demo6 LINK_PUBLIC kalman-cpp armadillo)
target_link_libraries (demo7 LINK_PUBLIC kalman-cpp armadillo)
target_link_libraries (demo8 LINK_PUBLIC kalman-cpp armadillo)
target_link_libraries (demo9 LINK_PUBLIC kalman-cpp armadillo)
target_link_libraries (demo10 LINK_PUBLIC kalman-cpp armadillo)
target_link_libraries (demo11 LINK_PUBLIC kalman-cpp armadillo)
endif()