-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
70 lines (58 loc) · 1.48 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
cmake_minimum_required(VERSION 3.0.2)
project(rubi_server)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
message_generation
)
find_package(Boost REQUIRED)
add_message_files(
DIRECTORY msg
FILES
BoardAnnounce.msg
RubiInt.msg
RubiUnsignedInt.msg
RubiString.msg
RubiFloat.msg
RubiBool.msg
)
add_service_files(
DIRECTORY srv
FILES
CansNames.srv
FieldDescriptor.srv
FuncDescriptor.srv
BoardDescriptor.srv
BoardInstances.srv
ShowBoards.srv
BoardOnline.srv
BoardWake.srv
)
generate_messages(DEPENDENCIES std_msgs)
catkin_package()
include_directories(
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
add_executable(rubi_server
src/board.cpp src/communication.cpp src/can_handler.cpp src/descriptors.cpp
src/main.cpp src/protocol.cpp src/ros_frontend.cpp
src/rubi_autodefs.cpp src/socketcan.cpp
src/logger.cpp
)
add_executable(rubi_fake_server
src/fake_communication.cpp src/descriptors.cpp
src/fake_server.cpp src/ros_frontend.cpp src/rubi_autodefs.cpp
src/logger.cpp
)
add_dependencies(rubi_server rubi_server_generate_messages_cpp)
add_dependencies(rubi_fake_server rubi_server_generate_messages_cpp)
target_link_libraries(rubi_server ${catkin_LIBRARIES})
target_link_libraries(rubi_fake_server ${catkin_LIBRARIES})
install(TARGETS
rubi_server
rubi_fake_server
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)