@@ -2,50 +2,106 @@ cmake_minimum_required(VERSION 2.6)
22
33project (kalman-cpp)
44
5- set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ../bin)
6- set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ../bin)
7- set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ../bin)
8-
9- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
10-
11- set (CMAKE_BUILD_TYPE Debug)
12-
13- add_library (kalman-cpp ./kalman/kf.cpp ./kalman/ekf.cpp ./kalman/ekf2.cpp ./kalman/ukf.cpp ./kalman/fx.cpp )
14-
15- target_include_directories (kalman-cpp PUBLIC ./kalman )
16-
17- add_executable (demo1 ./samples/main1.cpp )
18- add_executable (demo2 ./samples/main2.cpp )
19- add_executable (demo3 ./samples/main3.cpp )
20- add_executable (demo4 ./samples/main4.cpp )
21- add_executable (demo5 ./samples/main5.cpp )
22- add_executable (demo6 ./samples/main6.cpp )
23- add_executable (demo7 ./samples/main7.cpp )
24- add_executable (demo8 ./samples/main8.cpp )
25- add_executable (demo9 ./samples/main9.cpp )
26- add_executable (demo10 ./samples/main10.cpp )
27- add_executable (demo11 ./samples/main11.cpp )
28-
29- install (TARGETS demo1 RUNTIME DESTINATION ../bin)
30- install (TARGETS demo2 RUNTIME DESTINATION ../bin)
31- install (TARGETS demo3 RUNTIME DESTINATION ../bin)
32- install (TARGETS demo4 RUNTIME DESTINATION ../bin)
33- install (TARGETS demo5 RUNTIME DESTINATION ../bin)
34- install (TARGETS demo6 RUNTIME DESTINATION ../bin)
35- install (TARGETS demo7 RUNTIME DESTINATION ../bin)
36- install (TARGETS demo8 RUNTIME DESTINATION ../bin)
37- install (TARGETS demo9 RUNTIME DESTINATION ../bin)
38- install (TARGETS demo10 RUNTIME DESTINATION ../bin)
39- install (TARGETS demo11 RUNTIME DESTINATION ../bin)
40-
41- target_link_libraries (demo1 LINK_PUBLIC kalman-cpp armadillo )
42- target_link_libraries (demo2 LINK_PUBLIC kalman-cpp armadillo )
43- target_link_libraries (demo3 LINK_PUBLIC kalman-cpp armadillo )
44- target_link_libraries (demo4 LINK_PUBLIC kalman-cpp armadillo )
45- target_link_libraries (demo5 LINK_PUBLIC kalman-cpp armadillo )
46- target_link_libraries (demo6 LINK_PUBLIC kalman-cpp armadillo )
47- target_link_libraries (demo7 LINK_PUBLIC kalman-cpp armadillo )
48- target_link_libraries (demo8 LINK_PUBLIC kalman-cpp armadillo )
49- target_link_libraries (demo9 LINK_PUBLIC kalman-cpp armadillo )
50- target_link_libraries (demo10 LINK_PUBLIC kalman-cpp armadillo )
51- target_link_libraries (demo11 LINK_PUBLIC kalman-cpp armadillo )
5+ if (CMAKE_GENERATOR MATCHES "Visual Studio" )
6+ # Do Visual Studio specific stuff
7+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ../bin)
8+ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ../bin)
9+ set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ../bin)
10+
11+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
12+
13+ set (CMAKE_BUILD_TYPE Debug)
14+
15+ link_directories (${CMAKE_SOURCE_DIR} /windows-libs )
16+ add_library (kalman-cpp ./kalman/kf.cpp ./kalman/ekf.cpp ./kalman/ekf2.cpp ./kalman/ukf.cpp ./kalman/fx.cpp )
17+
18+ target_include_directories (kalman-cpp PUBLIC ./kalman ./windows-libs/armadillo/include )
19+
20+ add_executable (demo1 ./samples/main1.cpp )
21+ add_executable (demo2 ./samples/main2.cpp )
22+ add_executable (demo3 ./samples/main3.cpp )
23+ add_executable (demo4 ./samples/main4.cpp )
24+ add_executable (demo5 ./samples/main5.cpp )
25+ add_executable (demo6 ./samples/main6.cpp )
26+ add_executable (demo7 ./samples/main7.cpp )
27+ add_executable (demo8 ./samples/main8.cpp )
28+ add_executable (demo9 ./samples/main9.cpp )
29+ add_executable (demo10 ./samples/main10.cpp )
30+ add_executable (demo11 ./samples/main11.cpp )
31+
32+ install (TARGETS demo1 RUNTIME DESTINATION ../bin)
33+ install (TARGETS demo2 RUNTIME DESTINATION ../bin)
34+ install (TARGETS demo3 RUNTIME DESTINATION ../bin)
35+ install (TARGETS demo4 RUNTIME DESTINATION ../bin)
36+ install (TARGETS demo5 RUNTIME DESTINATION ../bin)
37+ install (TARGETS demo6 RUNTIME DESTINATION ../bin)
38+ install (TARGETS demo7 RUNTIME DESTINATION ../bin)
39+ install (TARGETS demo8 RUNTIME DESTINATION ../bin)
40+ install (TARGETS demo9 RUNTIME DESTINATION ../bin)
41+ install (TARGETS demo10 RUNTIME DESTINATION ../bin)
42+ install (TARGETS demo11 RUNTIME DESTINATION ../bin)
43+
44+ target_link_libraries (demo1 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
45+ target_link_libraries (demo2 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
46+ target_link_libraries (demo3 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
47+ target_link_libraries (demo4 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
48+ target_link_libraries (demo5 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
49+ target_link_libraries (demo6 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
50+ target_link_libraries (demo7 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
51+ target_link_libraries (demo8 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
52+ target_link_libraries (demo9 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
53+ target_link_libraries (demo10 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
54+ target_link_libraries (demo11 LINK_PUBLIC kalman-cpp cbia.lib.lapack.dyn.rel.x64.12 cbia.lib.blas.dyn.rel.x64.12 )
55+
56+ else ()
57+ # Other stuff
58+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ../bin)
59+ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ../bin)
60+ set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ../bin)
61+
62+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
63+
64+ set (CMAKE_BUILD_TYPE Debug)
65+
66+ add_library (kalman-cpp ./kalman/kf.cpp ./kalman/ekf.cpp ./kalman/ekf2.cpp ./kalman/ukf.cpp ./kalman/fx.cpp )
67+
68+ target_include_directories (kalman-cpp PUBLIC ./kalman )
69+
70+ add_executable (demo1 ./samples/main1.cpp )
71+ add_executable (demo2 ./samples/main2.cpp )
72+ add_executable (demo3 ./samples/main3.cpp )
73+ add_executable (demo4 ./samples/main4.cpp )
74+ add_executable (demo5 ./samples/main5.cpp )
75+ add_executable (demo6 ./samples/main6.cpp )
76+ add_executable (demo7 ./samples/main7.cpp )
77+ add_executable (demo8 ./samples/main8.cpp )
78+ add_executable (demo9 ./samples/main9.cpp )
79+ add_executable (demo10 ./samples/main10.cpp )
80+ add_executable (demo11 ./samples/main11.cpp )
81+
82+ install (TARGETS demo1 RUNTIME DESTINATION ../bin)
83+ install (TARGETS demo2 RUNTIME DESTINATION ../bin)
84+ install (TARGETS demo3 RUNTIME DESTINATION ../bin)
85+ install (TARGETS demo4 RUNTIME DESTINATION ../bin)
86+ install (TARGETS demo5 RUNTIME DESTINATION ../bin)
87+ install (TARGETS demo6 RUNTIME DESTINATION ../bin)
88+ install (TARGETS demo7 RUNTIME DESTINATION ../bin)
89+ install (TARGETS demo8 RUNTIME DESTINATION ../bin)
90+ install (TARGETS demo9 RUNTIME DESTINATION ../bin)
91+ install (TARGETS demo10 RUNTIME DESTINATION ../bin)
92+ install (TARGETS demo11 RUNTIME DESTINATION ../bin)
93+
94+ target_link_libraries (demo1 LINK_PUBLIC kalman-cpp armadillo )
95+ target_link_libraries (demo2 LINK_PUBLIC kalman-cpp armadillo )
96+ target_link_libraries (demo3 LINK_PUBLIC kalman-cpp armadillo )
97+ target_link_libraries (demo4 LINK_PUBLIC kalman-cpp armadillo )
98+ target_link_libraries (demo5 LINK_PUBLIC kalman-cpp armadillo )
99+ target_link_libraries (demo6 LINK_PUBLIC kalman-cpp armadillo )
100+ target_link_libraries (demo7 LINK_PUBLIC kalman-cpp armadillo )
101+ target_link_libraries (demo8 LINK_PUBLIC kalman-cpp armadillo )
102+ target_link_libraries (demo9 LINK_PUBLIC kalman-cpp armadillo )
103+ target_link_libraries (demo10 LINK_PUBLIC kalman-cpp armadillo )
104+ target_link_libraries (demo11 LINK_PUBLIC kalman-cpp armadillo )
105+
106+ endif ()
107+
0 commit comments