-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
120 lines (104 loc) · 5.62 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
111
112
113
114
115
116
117
118
119
120
cmake_minimum_required(VERSION 3.1.0)
project(robo_controller)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# Additional CMake modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
# add extra include directories
include_directories(/usr/local/include)
# add extra lib directories
link_directories(/usr/local/lib)
find_package(LibXml2 REQUIRED)
include_directories(${LIBXML2_INCLUDE_DIR})
# Prepare for QT
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
## Set the OpenCV HomeDir and library files
find_package(OpenCV REQUIRED)
set(LIBS ${OpenCV_LIBS})
## load asebaclient library
set(LIBS ${LIBS} asebaclient)
## including qt5 dbus,core which is requried by asebaclient
set(Qt5_DIR /usr/local/opt/qt/lib/cmake/Qt5/)
find_package(Qt5 CONFIG REQUIRED DBus Core)
#Protobufs
find_package(Protobuf REQUIRED)
find_package(GRPC REQUIRED)
add_subdirectory(messages)
## Setup project source files
set(SOURCE_FILES ${SOURCE_FILES} include/config/RobotConfig.h)
set(SOURCE_FILES ${SOURCE_FILES} include/configuration/RobotConfiguration.h)
#set(SOURCE_FILES ${SOURCE_FILES} include/configuration/AsebaRobotConfiguration.h)
set(SOURCE_FILES ${SOURCE_FILES} include/configuration/EmergentRobotConfiguration.h)
set(SOURCE_FILES ${SOURCE_FILES} include/controller/RobotController.h)
set(SOURCE_FILES ${SOURCE_FILES} include/controller/RobotControllerFactory.h)
set(SOURCE_FILES ${SOURCE_FILES} include/controller/ThymioController.h)
#set(SOURCE_FILES ${SOURCE_FILES} include/controller/ThymioEmergentController.h)
set(SOURCE_FILES ${SOURCE_FILES} include/controller/ThymioOAController.h)
set(SOURCE_FILES ${SOURCE_FILES} include/detector/Detector.h)
set(SOURCE_FILES ${SOURCE_FILES} include/detector/DetectorFactory.h)
set(SOURCE_FILES ${SOURCE_FILES} include/detector/RobotDetector.h)
set(SOURCE_FILES ${SOURCE_FILES} include/manager/RobotManager.h)
set(SOURCE_FILES ${SOURCE_FILES} include/robot/Thymio.h)
set(SOURCE_FILES ${SOURCE_FILES} include/network/RobotServiceClient.h)
set(SOURCE_FILES ${SOURCE_FILES} include/network/GrpcServer.h)
set(SOURCE_FILES ${SOURCE_FILES} include/network/RobotServiceImpl.h)
set(SOURCE_FILES ${SOURCE_FILES} include/network/SimulationServiceImpl.h)
set(SOURCE_FILES ${SOURCE_FILES} include/util/ea/Gene.h)
set(SOURCE_FILES ${SOURCE_FILES} include/util/env/Environment.h)
set(SOURCE_FILES ${SOURCE_FILES} include/util/neuralnetworks/Elman.h)
set(SOURCE_FILES ${SOURCE_FILES} include/util/neuralnetworks/LayeredNeuralNetwork.h)
set(SOURCE_FILES ${SOURCE_FILES} include/util/neuralnetworks/MLP.h)
set(SOURCE_FILES ${SOURCE_FILES} include/util/neuralnetworks/NeuralNetwork.h)
set(SOURCE_FILES ${SOURCE_FILES} include/util/neuralnetworks/NeuralNetworkException.h)
set(SOURCE_FILES ${SOURCE_FILES} include/util/neuralnetworks/Perceptron.h)
set(SOURCE_FILES ${SOURCE_FILES} include/util/neuralnetworks/ReservoirNeuralNetwork.h)
set(SOURCE_FILES ${SOURCE_FILES} include/video/VideoAnalyser.h)
set(SOURCE_FILES ${SOURCE_FILES} include/video/VideoHandler.h)
set(SOURCE_FILES ${SOURCE_FILES} include/FrameStructure.h)
set(SOURCE_FILES ${SOURCE_FILES} include/SharedFrame.h)
set(SOURCE_FILES ${SOURCE_FILES} include/SharedQueue.h)
set(SOURCE_FILES ${SOURCE_FILES} src/configuration/EmergentRobotConfiguration.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/controller/RobotControllerFactory.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/controller/ThymioController.cpp)
#set(SOURCE_FILES ${SOURCE_FILES} src/controller/ThymioEmergentController.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/controller/ThymioOAController.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/detector/DetectorFactory.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/detector/RobotDetector.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/manager/RobotManager.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/network/RobotServiceClient.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/network/GrpcServer.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/network/RobotServiceImpl.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/network/SimulationServiceImpl.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/util/ea/Gene.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/util/env/Environment.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/util/neuralnetworks/Elman.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/util/neuralnetworks/LayeredNeuralNetwork.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/util/neuralnetworks/MLP.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/util/neuralnetworks/NeuralNetwork.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/util/neuralnetworks/NeuralNetworkException.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/util/neuralnetworks/Perceptron.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/util/neuralnetworks/ReservoirNeuralNetwork.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/video/VideoHandler.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/video/VideoAnalyser.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/SharedQueue.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/SharedFrame.cpp)
set(SOURCE_FILES ${SOURCE_FILES} src/main.cpp src/network/RobotServiceClient.cpp)
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} ${LIBS} Qt5::Core Qt5::DBus messages asebaclient support ${LIBXML2_LIBRARIES})
install(TARGETS ${PROJECT_NAME} EXPORT EmergentControllerConfig
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
install(DIRECTORY res DESTINATION share/${PROJECT_NAME}
PATTERN "res/images/*"
PATTERN "res/config/*"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
)
install(DIRECTORY res/scripts DESTINATION lib/systemd/system
PATTERN "res/scripts/*"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
)