-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists_standalone.txt
132 lines (100 loc) · 5 KB
/
CMakeLists_standalone.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
cmake_minimum_required(VERSION 2.8.3)
project(uav_model)
# Stand-alone compilation CMakeLists
add_compile_options(-Wall -O3)
# set(COMPILE_FLAGS "-O3 -Wall")
set(BUILD_SHARED_LIBS "Enabling shared library building" ON)
find_package(Eigen3 REQUIRED)
find_package(LAPACK REQUIRED)
# Have yaml-cpp already copied and built
find_package(yaml-cpp PATHS external/yaml-cpp/build)
include_directories(
include
include/propulsion
include/ground_reaction
${EIGEN3_INCLUDE_DIRS}
${LAPACK_INCLUDE_DIRS}
"/usr/local/inlcude" # Used to include nlopt
)
add_library(math_utils src/math_utils.cpp)
target_link_libraries(math_utils ${LAPACK_LIBRARIES} Eigen3::Eigen)
add_library(uav_utils src/uav_utils.cpp)
target_link_libraries(uav_utils Eigen3::Eigen)
add_library(prog_utils src/prog_utils.cpp)
target_link_libraries(prog_utils math_utils yaml-cpp)
add_library(lib_environment src/environment.cpp)
target_link_libraries(lib_environment math_utils uav_utils Eigen3::Eigen)
add_library(lib_gravity src/gravity.cpp)
target_link_libraries(lib_gravity math_utils uav_utils Eigen3::Eigen)
add_library(lib_aerodynamics src/aerodynamics.cpp)
target_link_libraries(lib_aerodynamics prog_utils uav_utils math_utils lib_environment yaml-cpp Eigen3::Eigen)
add_library(lib_propulsion src/propulsion/propulsion.cpp)
target_link_libraries(lib_propulsion uav_utils math_utils prog_utils lib_environment yaml-cpp Eigen3::Eigen)
add_library(lib_ground_reaction src/ground_reaction/ground_reaction.cpp)
target_link_libraries(lib_ground_reaction uav_utils math_utils prog_utils yaml-cpp Eigen3::Eigen)
add_library(lib_uav_model src/dynamics.cpp src/kinematics.cpp src/uav_model.cpp)
target_link_libraries(lib_uav_model uav_utils
math_utils
yaml-cpp
prog_utils
lib_environment
lib_gravity
lib_propulsion
lib_aerodynamics
lib_ground_reaction
Eigen3::Eigen)
add_library(lib_trimmer src/trimmer.cpp)
target_link_libraries(lib_trimmer
"/usr/local/lib/libnlopt.so"
lib_uav_model)
# Copy data files to home folder
file(COPY last_letter_models DESTINATION $ENV{HOME})
# Compile test files
add_executable(test_rotations test/test_rotations.cpp)
target_link_libraries(test_rotations math_utils uav_utils Eigen3::Eigen)
add_executable(test_yaml test/test_yaml.cpp)
target_link_libraries(test_yaml prog_utils yaml-cpp)
add_executable(test_prog_utils test/test_prog_utils.cpp)
target_link_libraries(test_prog_utils prog_utils uav_utils)
add_executable(test_environment test/test_environment.cpp)
target_link_libraries(test_environment lib_environment prog_utils yaml-cpp)
add_executable(test_gravity test/test_gravity.cpp)
target_link_libraries(test_gravity lib_gravity)
add_executable(test_aerodynamics test/test_aerodynamics.cpp)
target_link_libraries(test_aerodynamics yaml-cpp lib_aerodynamics)
add_executable(test_propulsion test/test_propulsion.cpp)
target_link_libraries(test_propulsion lib_propulsion)
add_executable(test_ground_reaction test/test_ground_reaction.cpp)
target_link_libraries(test_ground_reaction lib_ground_reaction)
add_executable(test_dynamics src/dynamics.cpp test/test_dynamics.cpp )
target_link_libraries(test_dynamics uav_utils
math_utils
prog_utils
lib_environment
lib_gravity
lib_propulsion
lib_aerodynamics
lib_ground_reaction
yaml-cpp
Eigen3::Eigen)
add_executable(test_kinematics src/kinematics.cpp test/test_kinematics.cpp )
target_link_libraries(test_kinematics uav_utils
math_utils
prog_utils
lib_environment
lib_gravity
lib_propulsion
lib_aerodynamics
lib_ground_reaction
yaml-cpp
Eigen3::Eigen)
add_executable(test_uav_model test/test_uav_model.cpp)
target_link_libraries(test_uav_model lib_uav_model)
add_executable(test_parameters test/test_parameters.cpp)
target_link_libraries(test_parameters lib_uav_model)
add_executable(test_loop_rate test/test_loop_rate.cpp)
target_link_libraries(test_loop_rate lib_uav_model)
add_executable(test_trimmer_input test/test_trimmer_input.cpp)
target_link_libraries(test_trimmer_input lib_trimmer)
add_executable(test_trimmer_state test/test_trimmer_state.cpp)
target_link_libraries(test_trimmer_state lib_trimmer)