-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
130 lines (115 loc) · 3.28 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
121
122
123
124
125
126
127
128
129
130
#
# (C) Copyright 2015-2023 Johns Hopkins University (JHU), All Rights Reserved.
#
# --- begin cisst license - do not edit ---
#
# This software is provided "as is" under an open source license, with
# no warranty. The complete license can be found in license.txt and
# http://www.cisst.org/cisst/license.txt.
#
# --- end cisst license ---
cmake_minimum_required (VERSION 3.10)
project (dvrk_robot VERSION 2.2.1)
find_package (ament_cmake REQUIRED)
find_package (rclcpp REQUIRED)
find_package (std_msgs REQUIRED)
find_package (std_srvs REQUIRED)
find_package (geometry_msgs REQUIRED)
find_package (sensor_msgs REQUIRED)
find_package (diagnostic_msgs REQUIRED)
find_package (cisst_msgs REQUIRED)
find_package (tf2_ros REQUIRED)
find_package (tf2_msgs REQUIRED)
find_package (crtk_msgs REQUIRED)
find_package (cisst_ros2_bridge REQUIRED)
find_package (cisst_ros2_crtk REQUIRED)
# find cisst and make sure the required libraries have been compiled
set (REQUIRED_CISST_LIBRARIES
cisstCommon
cisstCommonXML
cisstCommonQt
cisstVector
cisstVectorQt
cisstOSAbstraction
cisstMultiTask
cisstMultiTaskQt
cisstParameterTypes
cisstParameterTypesQt
cisstRobot
cisstNumerical
cisstQt
)
find_package (cisst 1.2.0 REQUIRED ${REQUIRED_CISST_LIBRARIES})
if (cisst_FOUND_AS_REQUIRED)
include (${CISST_USE_FILE})
# sawRobotIO1394 has been compiled within cisst, we should find it automatically
find_package (sawRobotIO1394 2.2.0 REQUIRED)
find_package (sawControllers 2.1.0 REQUIRED)
find_package (sawIntuitiveResearchKit 2.2.0 REQUIRED)
include_directories (
${dvrk_robot_SOURCE_DIR}/include
${sawRobotIO1394_INCLUDE_DIR}
${sawControllers_INCLUDE_DIR}
${sawIntuitiveResearchKit_INCLUDE_DIR}
)
link_directories (
${sawRobotIO1394_LIBRARY_DIR}
${sawControllers_LIBRARY_DIR}
${sawIntuitiveResearchKit_LIBRARY_DIR}
)
# library
add_library (dvrk_utilities
include/dvrk_utilities/dvrk_console.h
src/dvrk_console.cpp
)
target_link_libraries (
dvrk_utilities
${sawRobotIO1394_LIBRARIES}
${sawIntuitiveResearchKit_LIBRARIES}
${sawControllers_LIBRARIES}
)
cisst_target_link_libraries (dvrk_utilities ${REQUIRED_CISST_LIBRARIES})
ament_target_dependencies (
dvrk_utilities
rclcpp
std_msgs
geometry_msgs
sensor_msgs
diagnostic_msgs
cisst_msgs
tf2_ros
crtk_msgs
cisst_ros2_bridge
cisst_ros2_crtk
)
# executable
add_executable (dvrk_console_json src/dvrk_console_json.cpp)
target_link_libraries (
dvrk_console_json
${sawRobotIO1394_LIBRARIES}
${sawIntuitiveResearchKit_LIBRARIES}
${sawControllers_LIBRARIES}
)
cisst_target_link_libraries (dvrk_console_json ${REQUIRED_CISST_LIBRARIES})
target_link_libraries (dvrk_console_json dvrk_utilities)
ament_target_dependencies (
dvrk_console_json
rclcpp
std_msgs
geometry_msgs
sensor_msgs
diagnostic_msgs
cisst_msgs
tf2_ros
crtk_msgs
cisst_ros2_bridge
cisst_ros2_crtk
)
install (TARGETS dvrk_utilities dvrk_console_json
LIBRARY DESTINATION lib/${PROJECT_NAME}
RUNTIME DESTINATION lib/${PROJECT_NAME}
LIBRARY DESTINATION lib
INCLUDES DESTINATION include
)
ament_package ()
endif (cisst_FOUND_AS_REQUIRED)