-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
114 lines (85 loc) · 2.86 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
# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html
cmake_minimum_required(VERSION 2.8.3)
project(vizzy_serial_interfaces)
find_package(catkin REQUIRED
COMPONENTS
roscpp
message_generation
nodelet
pluginlib
roscpp
roslint
sensor_msgs
tf
vizzy_msgs
)
catkin_package(
CATKIN_DEPENDS
message_runtime
nodelet
sensor_msgs
tf
serial
INCLUDE_DIRS
include
)
include_directories(include ${CMAKE_INSTALL_PREFIX}/include ${catkin_INCLUDE_DIRS} )
## Declare a cpp executable
add_library(vizzy_battery_monitor_interface src/VoltageCurrentSerialInterface.cpp)
target_link_libraries(vizzy_battery_monitor_interface
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${CMAKE_INSTALL_PREFIX}/lib/libserial.so
)
add_dependencies(vizzy_battery_monitor_interface vizzy_msgs_generate_messages_cpp)
#add_executable(battery_monitor_example src/VoltageCurrentSerialInterface.cpp)
add_executable(kokam_battery_state_service src/battery_state_service.cpp)
target_link_libraries(kokam_battery_state_service
${Boost_LIBRARIES}
${catkin_LIBRARIES}
vizzy_battery_monitor_interface
${CMAKE_INSTALL_PREFIX}/lib/libserial.so
)
add_executable(segway_battery_state_service src/segway_battery_state_service.cpp)
target_link_libraries(segway_battery_state_service
${Boost_LIBRARIES}
${catkin_LIBRARIES}
vizzy_battery_monitor_interface
${CMAKE_INSTALL_PREFIX}/lib/libserial.so
)
add_dependencies(segway_battery_state_service vizzy_msgs_generate_messages_cpp)
add_executable(battery_charging_state_service src/battery_charging_state_service.cpp)
target_link_libraries(battery_charging_state_service
${Boost_LIBRARIES}
${catkin_LIBRARIES}
vizzy_battery_monitor_interface
${CMAKE_INSTALL_PREFIX}/lib/libserial.so
)
add_dependencies(battery_charging_state_service vizzy_msgs_generate_messages_cpp)
add_executable(kokam_power_publisher src/kokam_power_publisher.cpp)
target_link_libraries(kokam_power_publisher
${Boost_LIBRARIES}
${catkin_LIBRARIES}
vizzy_battery_monitor_interface
${CMAKE_INSTALL_PREFIX}/lib/libserial.so
)
add_dependencies(kokam_power_publisher vizzy_msgs_generate_messages_cpp)
add_executable(vizzy_batteries_state_service src/vizzy_batteries_state_service.cpp)
target_link_libraries(vizzy_batteries_state_service
${Boost_LIBRARIES}
${catkin_LIBRARIES}
)
add_dependencies(vizzy_batteries_state_service vizzy_msgs_generate_messages_cpp)
# Install the plugin and the plugin description
install (DIRECTORY include/vizzy_sensors/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
# Install runtime launch and configuration files
foreach(dir config launch)
install(DIRECTORY ${dir}/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir})
endforeach()
# unit tests are enabled selectively
if (CATKIN_ENABLE_TESTING)
find_package(roslaunch REQUIRED)
roslaunch_add_file_check(launch)
endif()