generated from CoffeeKumazaki/cpp_template
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
45 lines (39 loc) · 1.04 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
## Use the variable PROJECT_NAME for changing the target name
get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME)
string(REPLACE " " "_" ProjectId ${ProjectId})
set( PROJECT_NAME ${ProjectId} )
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
project(${PROJECT_NAME})
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
# include_directories(include)
## Define librariess
add_library(${PROJECT_NAME}_lib
src/kalman_filters.cpp
src/ekf.cpp
src/ukf.cpp
src/system_simulator.cpp
src/system_model.cpp
)
target_include_directories(${PROJECT_NAME}_lib PUBLIC
include
)
## Define the executable
set(SRCS
src/main.cpp
)
add_executable(${PROJECT_NAME} ${SRCS})
target_include_directories(${PROJECT_NAME} PUBLIC
include
)
target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_lib)
add_executable(ukf_test
test/ukf_test.cpp
)
target_include_directories(ukf_test PUBLIC
include
)
target_link_libraries(ukf_test ${PROJECT_NAME}_lib)