This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
110 lines (97 loc) · 3.9 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
cmake_minimum_required(VERSION 3.16)
project(roboteam_robothub)
# for MacOS X or iOS, watchOS, tvOS (since 3.10.3)
if(APPLE)
set(Qt5Network_DIR "/usr/local/opt/qt/lib/cmake/Qt5Network")
endif()
# for Linux, BSD, Solaris, Minix
if(UNIX AND NOT APPLE)
SET(Qt5Network_DIR "/usr/include/x86_64-linux-gnu/qt5/Qt5Network")
endif()
find_package(Qt5Network REQUIRED)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
# Generate the proto files for the simulator manager
find_package(Protobuf 3.9.1 REQUIRED)
add_subdirectory(simulation_proto)
# Create the make file for the simulatorManager library
add_library(simulator_manager STATIC
"src/simulation/SimulatorManager.cpp"
"src/simulation/RobotControlCommand.cpp"
"src/simulation/ConfigurationCommand.cpp")
target_include_directories(simulator_manager PUBLIC "include")
target_link_libraries(simulator_manager PUBLIC
simulation_manager_proto
Qt5::Network
roboteam_utils
)
target_compile_options(simulator_manager PRIVATE "${COMPILER_FLAGS}")
# Create the make file for the basestationManager library
add_library(basestation_manager STATIC
"src/basestation/LibusbUtilities.cpp"
"src/basestation/Basestation.cpp"
"src/basestation/BasestationCollection.cpp"
"src/basestation/BasestationManager.cpp")
target_include_directories(basestation_manager PUBLIC
"include"
"roboteam_embedded_messages/include")
target_link_libraries(basestation_manager PUBLIC
Threads::Threads
lib::usb
roboteam_utils
)
target_compile_options(basestation_manager PRIVATE "${COMPILER_FLAGS}")
# Create the make file for RobotHub, which uses the basestationManager and simulationManager library
add_executable(roboteam_robothub "src/RobotHubStatistics.cpp" "src/RobotHub.cpp")
target_include_directories(roboteam_robothub
PRIVATE include
)
target_link_libraries(roboteam_robothub
PRIVATE simulator_manager
PRIVATE basestation_manager
PRIVATE roboteam_networking
PRIVATE roboteam_utils
)
target_compile_options(roboteam_robothub PRIVATE "${COMPILER_FLAGS}")
# add_executable(roboteam_robothub_logger "src/RobotHubLogger.cpp")
# target_include_directories(roboteam_robothub_logger
# PRIVATE include
# "roboteam_embedded_messages/include"
# )
# target_link_libraries(roboteam_robothub_logger
# PRIVATE roboteam_networking
# PRIVATE roboteam_utils
# )
# target_compile_options(roboteam_robothub_logger PRIVATE "${COMPILER_FLAGS}")
# Create the make file for robothub_enumerate_usb
add_executable(roboteam_robothub_enumerate_usb
src/basestation/LibusbUtilities.cpp
src/basestation/EnumerateBasestations.cpp
)
target_include_directories(roboteam_robothub_enumerate_usb
PRIVATE include/
)
target_link_libraries(roboteam_robothub_enumerate_usb
Threads::Threads
lib::usb
)
target_compile_options(roboteam_robothub_enumerate_usb PRIVATE "${COMPILER_FLAGS}")
# Create the make file for scripts/RobotControl.cpp
add_executable(roboteam_robothub_robotControlScript
"scripts/RobotControlScript.cpp"
)
target_link_libraries(roboteam_robothub_robotControlScript PRIVATE roboteam_networking)
target_compile_options(roboteam_robothub_robotControlScript PRIVATE "${COMPILER_FLAGS}")
# Create the make file for scripts/RobotMonitor.cpp
add_executable(roboteam_robothub_robotMonitor
"scripts/RobotMonitor.cpp"
)
target_link_libraries(roboteam_robothub_robotMonitor PRIVATE roboteam_networking)
target_compile_options(roboteam_robothub_robotMonitor PRIVATE "${COMPILER_FLAGS}")
# Create make file for simulation formation test
add_executable(roboteam_robothub_formation
scripts/sendFormationToSimulator.cpp
)
target_link_libraries(roboteam_robothub_formation PUBLIC simulator_manager)
target_compile_options(roboteam_robothub_formation PRIVATE "${COMPILER_FLAGS}")