-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
89 lines (75 loc) · 2.19 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
cmake_minimum_required(VERSION 3.2)
project(HORST)
set(PROJECT_BRIEF "HORST is the brain of the MOVEII satellite.")
set(VERSION_MAJOR 2)
set(VERSION_MINOR 2)
include(version/version.cmake)
message("configuring horst...")
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
find_package(s3tp REQUIRED)
include_directories(${S3TP_INCLUDE_DIRS})
find_library(uv uv)
find_library(systemd systemd)
find_library(systemd++ systemd++)
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_BUILD_TYPE RELEASE)
include_directories("${PROJECT_SOURCE_DIR}")
include_directories("${PROJECT_SOURCE_DIR}/action")
include_directories("${PROJECT_SOURCE_DIR}/event")
include_directories("${PROJECT_SOURCE_DIR}/server")
add_executable(horst
src/action/action.cpp
src/action/enter_manualmode.cpp
src/action/enter_safemode.cpp
src/action/finish_leop.cpp
src/action/leave_manualmode.cpp
src/action/leave_safemode.cpp
src/action/shell_command.cpp
src/action/trigger_detumbling.cpp
src/action/trigger_measuring.cpp
src/action/trigger_sunpointing.cpp
src/error.cpp
src/event/adcs_req_signal.cpp
src/event/adcs_signal.cpp
src/event/ctlmessage.cpp
src/event/eps_signal.cpp
src/event/event.cpp
src/event/leop_req.cpp
src/event/leop_signal.cpp
src/event/maneuvermode_signal.cpp
src/event/manualmode_req.cpp
src/event/manualmode_signal.cpp
src/event/payload_req.cpp
src/event/payload_signal.cpp
src/event/req_daemon_control.cpp
src/event/req_shell_command.cpp
src/event/safemode_req.cpp
src/event/safemode_signal.cpp
src/event/thm_signal.cpp
src/horst.cpp
src/process.cpp
src/satellite.cpp
src/server/dbus.cpp
src/server/s3tp.cpp
src/state/adcs.cpp
src/state/computer.cpp
src/state/eps.cpp
src/state/payload.cpp
src/state/state.cpp
src/state/state_component.cpp
src/state/thm.cpp
src/util.cpp
${version_file}
)
target_link_libraries(horst ${uv})
target_link_libraries(horst dl)
target_link_libraries(horst ${systemd} ${systemd++})
target_link_libraries(horst ${S3TP_LIBRARY})
install(TARGETS horst RUNTIME DESTINATION bin)
# doxygen build
set(DOXYGEN_TARGETS horst)
include(doc/docs.cmake)