-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
81 lines (70 loc) · 1.74 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
cmake_minimum_required(VERSION 3.2)
set(project_name kinetics)
project(${project_name})
# debuging mode
#set(CMAKE_BUILD_TYPE Debug)
include_directories(include /usr/include/eigen3)
include_directories(include /usr/include/gtest)
find_library(gtest gtest)
set(test_name kinetics_test)
find_library(pthread pthread)
find_library(algebra algebra)
# set ++17 compiler
set(CMAKE_CXX_STANDARD 17)
# add algebra library
########################
# build libkinetics.a
########################
add_library(${project_name} STATIC
./src/kinetics.cpp
./src/kinematics.cpp
./src/graph.cpp
./src/obstacles.cpp
./src/trajectory.cpp
./include/kinetics.hpp
./include/kinematics.hpp
./include/trajectory.hpp
./include/utils.hpp
)
################
# build tests
################
add_executable(${test_name} ./tests/kinematics_test.cpp
./tests/kinetics_test.cpp
./tests/trajectory_test.cpp
./tests/mission_planning_test.cpp
./tests/graph_test.cpp
./tests/rrt_test.cpp
./src/kinematics.cpp
./src/kinetics.cpp
./src/trajectory.cpp
./src/graph.cpp
./src/obstacles.cpp
./include/kinematics.hpp
./include/kinetics.hpp
./include/trajectory.hpp
./include/utils.hpp
)
target_link_libraries(${test_name} gtest pthread algebra)
################
# build docs
################
execute_process(COMMAND doxygen docs/Doxyfile
WORKING_DIRECTORY docs
)
execute_process(COMMAND make
WORKING_DIRECTORY docs/latex
)
install(TARGETS ${project_name})
install(FILES include/astar.hpp
include/kinematics.hpp
include/logger.hpp
include/mission.hpp
include/obstacles.hpp
include/trajectory.hpp
include/graph.hpp
include/kinetics.hpp
include/manipulation.hpp
include/rrt.hpp
include/utils.hpp
DESTINATION /usr/include/${project_name})