Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
roscontrol_sot
Commits
94bc5c7a
Commit
94bc5c7a
authored
Feb 05, 2021
by
Joseph Mirabel
Browse files
[CMake] Fix optionnal dep temperature_sensor_controller
parent
d438243f
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
94bc5c7a
...
...
@@ -34,8 +34,7 @@ SEARCH_FOR_BOOST_PYTHON()
add_required_dependency
(
bullet
)
add_required_dependency
(
urdfdom
)
SET
(
CATKIN_REQUIRED_COMPONENTS
temperature_sensor_controller
find_package
(
catkin REQUIRED COMPONENTS
pal_hardware_interfaces
controller_interface
controller_manager
...
...
@@ -47,8 +46,7 @@ SET(CATKIN_REQUIRED_COMPONENTS
realtime_tools
rospy
)
find_package
(
catkin REQUIRED COMPONENTS
${
CATKIN_REQUIRED_COMPONENTS
}
)
find_package
(
temperature_sensor_controller
)
ADD_PROJECT_DEPENDENCY
(
dynamic-graph-python 4.0.0 REQUIRED
)
ADD_PROJECT_DEPENDENCY
(
dynamic_graph_bridge REQUIRED
)
...
...
@@ -65,19 +63,26 @@ endif(controller_interface_FOUND)
# Detect if temperature sensor controller package is found
# if yes then it is a PAL Robotics Forked code.
if
(
temperature_sensor_controller_FOUND
)
add_definitions
(
-DTEMPERATURE_SENSOR_CONTROLLER
)
endif
(
temperature_sensor_controller_FOUND
)
add_library
(
rcsot_controller
src/roscontrol-sot-controller.cpp
src/log.cpp
)
TARGET_INCLUDE_DIRECTORIES
(
rcsot_controller SYSTEM PUBLIC
${
catkin_INCLUDE_DIRS
}
)
TARGET_INCLUDE_DIRECTORIES
(
rcsot_controller PUBLIC $<INSTALL_INTERFACE:include>
)
TARGET_LINK_LIBRARIES
(
rcsot_controller
${
catkin_LIBRARIES
}
${
bullet_LIBRARIES
}
sot-core::sot-core dynamic_graph_bridge::sot_loader
target_include_directories
(
rcsot_controller SYSTEM PUBLIC
${
catkin_INCLUDE_DIRS
}
$<INSTALL_INTERFACE:include>
)
target_link_libraries
(
rcsot_controller
${
catkin_LIBRARIES
}
${
bullet_LIBRARIES
}
sot-core::sot-core
dynamic_graph_bridge::sot_loader
${
control_toolbox_LIBRARIES
}
)
if
(
temperature_sensor_controller_FOUND
)
target_compile_definitions
(
rcsot_controller PUBLIC TEMPERATURE_SENSOR_CONTROLLER
)
message
(
"temperature_sensor_controller_LIBRARIES:
${
temperature_sensor_controller_LIBRARIES
}
"
)
target_include_directories
(
rcsot_controller SYSTEM PUBLIC
${
temperature_sensor_controller_INCLUDE_DIRS
}
)
target_link_libraries
(
rcsot_controller
${
temperature_sensor_controller_LIBRARIES
}
)
endif
()
IF
(
SUFFIX_SO_VERSION
)
SET_TARGET_PROPERTIES
(
rcsot_controller PROPERTIES SOVERSION
${
PROJECT_VERSION
}
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment