-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
67 lines (55 loc) · 1.54 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
cmake_minimum_required(VERSION 2.8.3)
project(oro_barrett_hw)
find_package(catkin REQUIRED
cmake_modules
control_toolbox
urdf
kdl_parser
rtt_ros
rtt_ros_tools
angles
)
if("$ENV{OROCOS_TARGET}" STREQUAL "xenomai")
find_package(barrett)
find_package(Xenomai)
find_package(Eigen REQUIRED)
find_package(OROCOS-RTT REQUIRED)
find_package(orocos_kdl REQUIRED)
include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
include_directories(include
${Eigen_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${BARRETT_INCLUDE_DIRS}
${Xenomai_INCLUDE_DIRS}
${orocos_kdl_INCLUDE_DIRS}
${USE_OROCOS_INCLUDE_DIRS})
add_definitions(
${Eigen_DEFINITIONS}
${BARRETT_DEFINITIONS})
link_directories(${BARRETT_LIBRARY_DIRS})
add_library(butterworth
src/butterworth_solver.c)
orocos_component(barrett_hw_manager
src/barrett_hw_manager.cpp)
message(STATUS "--- ${USE_OROCOS_LIBRARIES}")
target_link_libraries(barrett_hw_manager
butterworth
${kdl_parser_LIBRARIES}
${urdf_LIBRARIES}
${USE_OROCOS_LIBRARIES}
${BARRETT_LIBRARIES}
${orocos_kdl_LIBRARIES})
if(CATKIN_ENABLE_TESTING)
orocos_use_package(ocl-deployment)
orocos_use_package(ocl-taskbrowser)
endif()
orocos_generate_package(
INCLUDE_DIRS include
DEPENDS barrett
DEPENDS_TARGETS oro_barrett_interface)
else()
message(WARNING "libbarret or xenomai could not be found, so oro_barrett_hw is not being built.")
orocos_generate_package(
INCLUDE_DIRS include
DEPENDS_TARGETS oro_barrett_interface)
endif()