forked from ipab-slmc/polhemus_ros_driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
89 lines (72 loc) · 1.97 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
cmake_minimum_required(VERSION 3.0.2)
project(polhemus_ros_driver)
add_compile_options(-std=c++11)
find_package(PkgConfig REQUIRED)
pkg_check_modules(libusb-1.0 libusb-1.0 QUIET)
if(NOT ${libusb_1_FOUND})
message(FATAL_ERROR "Could not find libusb1")
endif()
find_package(catkin REQUIRED COMPONENTS
genmsg
std_msgs
geometry_msgs
actionlib_msgs
tf2
tf2_ros
roscpp
message_generation
)
catkin_python_setup()
add_service_files(
FILES
calibrate.srv
set_source.srv
persist.srv
Publish.srv
)
add_action_files(
FILES
Calibrate.action
)
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
actionlib_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES polhemus
CATKIN_DEPENDS std_msgs geometry_msgs actionlib_msgs tf2 tf2_ros roscpp message_runtime
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${LIBUSB_1_INCLUDE_DIRS}
)
add_executable(polhemus_tf_broadcaster src/polhemus_ros_driver/polhemus_tf_broadcaster.cpp)
add_dependencies(polhemus_tf_broadcaster polhemus_ros_driver_generate_messages_cpp)
add_library(polhemus
src/polhemus_ros_driver/liberty.cpp
src/polhemus_ros_driver/viper.cpp
src/polhemus_ros_driver/polhemus.cpp
)
add_dependencies(polhemus polhemus_ros_driver_generate_messages_cpp)
target_link_libraries(polhemus_tf_broadcaster
${catkin_LIBRARIES}
${LIBUSB_1_LIBRARIES}
usb-1.0
polhemus
)
install(DIRECTORY include/polhemus_ros_driver
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(TARGETS polhemus_tf_broadcaster polhemus
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(FILES launch/start.launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch)
install(FILES
config/shadow_glove_user_calibration_defaults/default_calibration_left.yaml
config/shadow_glove_user_calibration_defaults/default_calibration_right.yaml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config/shadow_glove_user_calibration_defaults
)