-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
44 lines (35 loc) · 1.43 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
cmake_minimum_required(VERSION 2.8)
project(robot_state_publisher)
find_package(orocos_kdl REQUIRED)
find_package(catkin REQUIRED
COMPONENTS roscpp rosconsole rostime tf tf_conversions kdl_parser
cmake_modules std_msgs urdf
)
find_package(Eigen REQUIRED)
add_message_files(DIRECTORY msg FILES
URDFConfiguration.msg
)
generate_messages(DEPENDENCIES
std_msgs
)
catkin_package(
LIBRARIES ${PROJECT_NAME}_solver
INCLUDE_DIRS include
DEPENDS roscpp rosconsole rostime tf tf_conversions kdl_parser orocos_kdl
)
include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS})
include_directories(include ${catkin_INCLUDE_DIRS} ${orocos_kdl_INCLUDE_DIRS})
link_directories(${orocos_kdl_LIBRARY_DIRS})
add_library(${PROJECT_NAME}_solver
src/robot_state_publisher.cpp src/robot_kdl_tree.cpp src/robot_urdf.cpp
)
target_link_libraries(${PROJECT_NAME}_solver ${catkin_LIBRARIES} ${orocos_kdl_LIBRARIES})
add_dependencies(${PROJECT_NAME}_solver ${PROJECT_NAME}_generate_messages_cpp)
add_executable(${PROJECT_NAME} src/joint_state_listener.cpp)
target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_solver ${orocos_kdl_LIBRARIES})
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_generate_messages_cpp)
install(TARGETS ${PROJECT_NAME}_solver ${PROJECT_NAME}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})