-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
108 lines (86 loc) · 2.75 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
cmake_minimum_required(VERSION 3.0.2)
project(ur_ik_solver)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
find_package(catkin REQUIRED COMPONENTS
eigen_conversions
ik_solver_msgs
ur_kinematics
roscpp
tf_conversions
ik_solver
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ur_ik_solver
CATKIN_DEPENDS eigen_conversions ur_kinematics ik_solver_msgs roscpp tf_conversions ik_solver
# DEPENDS system_lib
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
# ur_kinematics individual libraries
find_library(libur3_kin ur3_kin)
find_library(libur5_kin ur5_kin)
find_library(libur10_kin ur10_kin)
find_library(libur3e_kin ur3e_kin)
find_library(libur5e_kin ur5e_kin)
find_library(libur10e_kin ur10e_kin)
add_library(ur3_ik_solver
src/${PROJECT_NAME}/ur_ik_solver.cpp
)
add_dependencies(ur3_ik_solver ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_library(ur5_ik_solver
src/${PROJECT_NAME}/ur_ik_solver.cpp
)
add_dependencies(ur5_ik_solver ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_library(ur10_ik_solver
src/${PROJECT_NAME}/ur_ik_solver.cpp
)
add_dependencies(ur10_ik_solver ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_library(ur3e_ik_solver
src/${PROJECT_NAME}/ur_ik_solver.cpp
)
add_dependencies(ur3e_ik_solver ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_library(ur5e_ik_solver
src/${PROJECT_NAME}/ur_ik_solver.cpp
)
add_dependencies(ur5e_ik_solver ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_library(ur10e_ik_solver
src/${PROJECT_NAME}/ur_ik_solver.cpp
)
add_dependencies(ur10e_ik_solver ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
# add_executable(${PROJECT_NAME}_node src/node.cpp)
#set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME ur_ik PREFIX "")
#add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(ur3_ik_solver
${libur3_kin} # Order matters!! Place before catkin_LIBRARIES to specify which UR is selected
${catkin_LIBRARIES}
)
target_link_libraries(ur5_ik_solver
${libur5_kin} # Order matters!!
${catkin_LIBRARIES}
)
target_link_libraries(ur10_ik_solver
${libur10_kin} # Order matters!!
${catkin_LIBRARIES}
)
target_link_libraries(ur3e_ik_solver
${libur3e_kin} # Order matters!!
${catkin_LIBRARIES}
)
target_link_libraries(ur5e_ik_solver
${libur5e_kin} # Order matters!!
${catkin_LIBRARIES}
)
target_link_libraries(ur10e_ik_solver
${libur10e_kin} # Order matters!!
${catkin_LIBRARIES}
)