forked from ethz-asl/vicon_bridge
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
82 lines (65 loc) · 2.1 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
cmake_minimum_required(VERSION 3.0.2)
project(vicon_bridge)
set(CMAKE_CXX_STANDARD 14)
find_package(catkin REQUIRED COMPONENTS
message_generation
dynamic_reconfigure
geometry_msgs
roscpp
tf
diagnostic_updater
)
find_package(Boost REQUIRED COMPONENTS thread date_time)
# Generate messages and services
add_message_files(FILES
Marker.msg
Markers.msg
TfDistortInfo.msg
)
add_service_files(FILES
viconCalibrateSegment.srv
viconGrabPose.srv
)
generate_messages(DEPENDENCIES geometry_msgs)
# Generate dynamic parameters
generate_dynamic_reconfigure_options(
cfg/tf_distort.cfg
)
catkin_package(CATKIN_DEPENDS
dynamic_reconfigure
geometry_msgs
message_runtime
roscpp
)
include_directories(
${catkin_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
vicon_sdk/DataStream # For Vicon SDK
vicon_sdk # For StreamCommon, required by ViconSDK
)
# Compile Vicon SDK from scratch to avoid Boost version mismatch clashes
file(GLOB_RECURSE vicon_sdk_files "${CMAKE_CURRENT_SOURCE_DIR}/vicon_sdk/**/**.cpp")
add_library(vicon_sdk ${vicon_sdk_files})
target_link_libraries(vicon_sdk PUBLIC ${Boost_LIBRARIES})
add_executable(vicon_bridge
src/vicon_bridge.cpp
)
target_link_libraries(vicon_bridge
vicon_sdk
${catkin_LIBRARIES}
)
add_dependencies(vicon_bridge ${PROJECT_NAME}_gencpp)
add_executable(calibrate src/calibrate_segment.cpp)
target_link_libraries(calibrate ${catkin_LIBRARIES})
add_dependencies(calibrate ${PROJECT_NAME}_gencpp)
add_executable(tf_distort src/tf_distort.cpp)
target_link_libraries(tf_distort ${catkin_LIBRARIES})
add_dependencies(tf_distort ${PROJECT_NAME}_gencpp ${PROJECT_NAME}_gencfg)
add_executable(testclient src/ViconDataStreamSDK_CPPTest.cpp)
target_link_libraries(testclient vicon_sdk)
# Install
install(TARGETS vicon_sdk vicon_bridge calibrate tf_distort testclient
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY launch cfg DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})