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
962a70ec
Commit
962a70ec
authored
Nov 10, 2019
by
Olivier Stasse
Browse files
[cmake] Export CMake Files.
parent
e64d4863
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
962a70ec
...
...
@@ -22,7 +22,10 @@ add_required_dependency("urdfdom")
SET
(
CATKIN_REQUIRED_COMPONENTS
pal_hardware_interfaces
controller_interface
temperature_sensor_controller
controller_interface
controller_manager
pal_common_msgs
roscpp
std_msgs
dynamic_graph_bridge
...
...
@@ -52,6 +55,8 @@ include_directories(include tests ${bullet_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
link_directories
(
${
bullet_LIBRARY_DIRS
}
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++0x"
)
SETUP_PROJECT
()
set
(
EXECUTABLE_OUTPUT_PATH
${
PROJECT_BINARY_DIR
}
/bin
)
...
...
@@ -61,33 +66,36 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${LIBRARY_OUTPUT_PATH}")
# Add dependency through jrl-cmakemodules to compile
# this code without catkin_make
add_required_dependency
(
"pal_hardware_interfaces"
)
add_optional_dependency
(
"temperature_sensor_controller"
)
add_required_dependency
(
roscpp
)
add_required_dependency
(
"realtime_tools >= 1.8"
)
add_required_dependency
(
"dynamic_graph_bridge"
)
add_required_dependency
(
"controller_interface"
)
add_required_dependency
(
"controller_manager"
)
add_required_dependency
(
"pal_common_msgs"
)
add_required_dependency
(
"dynamic-graph"
)
add_required_dependency
(
"dynamic-graph-python"
)
add_required_dependency
(
"sot-core"
)
#add_project_dependency(dynamic_graph_bridge REQUIRED)
add_project_dependency
(
dynamic-graph REQUIRED
)
add_project_dependency
(
dynamic-graph-python REQUIRED
)
add_project_dependency
(
sot-core REQUIRED
)
add_required_dependency
(
"pinocchio"
)
# This is necessary so that the pc file generated by catking is similar
# to the on done directly by jrl-cmake-modules
catkin_package
(
CATKIN_DEPENDS
roscpp realtime_tools message_runtime dynamic_graph_bridge
pal_hardware_interfaces controller_interface controller_manager
roscpp
realtime_tools
message_runtime
dynamic_graph_bridge
pal_hardware_interfaces
controller_interface controller_manager
LIBRARIES
${
CATKIN_DEPENDS_LIBRARIES
}
)
# Detect the controller interface version to switch code
if
(
CONTROLLER_INTERFACE
_FOUND
)
if
(
${
CONTROLLER_INTERFACE
_VERSION
}
VERSION_GREATER
"0.2.5"
)
if
(
controller_interface
_FOUND
)
if
(
${
controller_interface
_VERSION
}
VERSION_GREATER
"0.2.5"
)
add_definitions
(
-DCONTROLLER_INTERFACE_KINETIC
)
endif
(
${
CONTROLLER_INTERFACE
_VERSION
}
VERSION_GREATER
"0.2.5"
)
endif
(
CONTROLLER_INTERFACE
_FOUND
)
endif
(
${
controller_interface
_VERSION
}
VERSION_GREATER
"0.2.5"
)
endif
(
controller_interface
_FOUND
)
LIST
(
APPEND LOGGING_WATCHED_VARIABLES
CONTROLLER_INTERFACE_FOUND
CONTROLLER_INTERFACE_VERSION
)
# Detect if temperature sensor controller package is found
# if yes then it is a PARL Robotics Forked code.
if
(
TEMPERATURE_SENSOR_CONTROLLER_FOUND
)
...
...
@@ -123,10 +131,9 @@ target_link_libraries(rcsot_controller
${
bullet_LIBRARIES
}
)
pkg_config_use_dependency
(
rcsot_controller urdfdom optional
NO_INCLUDE_SYSTEM
)
pkg_config_use_dependency
(
rcsot_controller dynamic-graph optional
NO_INCLUDE_SYSTEM
)
#target_link_libraries(rcsot_controller urdfdom optional
# NO_INCLUDE_SYSTEM)
target_link_libraries
(
rcsot_controller dynamic-graph::dynamic-graph
)
## Mark executables and/or libraries for installation
install
(
TARGETS rcsot_controller DESTINATION lib
)
...
...
@@ -144,4 +151,13 @@ endforeach()
ADD_SUBDIRECTORY
(
tests
)
get_cmake_property
(
_variableNames VARIABLES
)
list
(
SORT _variableNames
)
foreach
(
_variableName
${
_variableNames
}
)
LIST
(
APPEND LOGGING_WATCHED_VARIABLES
${
_variableName
}
)
endforeach
()
SETUP_PROJECT_FINALIZE
()
tests/CMakeLists.txt
View file @
962a70ec
...
...
@@ -20,9 +20,6 @@ file(MAKE_DIRECTORY
${
LIBRARY_OUTPUT_PATH
}
/dynamic_graph/sot/test/sot_test_device
)
pkg_config_use_dependency
(
roscontrol_sot_hardware controller_manager
NO_INCLUDE_SYSTEM
)
target_link_libraries
(
roscontrol_sot_hardware
${
catkin_LIBRARIES
}
${
bullet_libraries
}
...
...
@@ -41,11 +38,12 @@ MACRO(build_test_device)
#set_target_properties(${DEVICE_NAME} PROPERTIES PREFIX "")
# Link the dynamic library containing the SoT with its dependencies.
PKG_CONFIG_USE_DEPENDENCY
(
${
DEVICE_NAME
}
"dynamic-graph"
)
PKG_CONFIG_USE_DEPENDENCY
(
${
DEVICE_NAME
}
"dynamic-graph-python"
)
PKG_CONFIG_USE_DEPENDENCY
(
${
DEVICE_NAME
}
"sot-core"
)
PKG_CONFIG_USE_DEPENDENCY
(
${
DEVICE_NAME
}
"pinocchio"
)
PKG_CONFIG_USE_DEPENDENCY
(
${
DEVICE_NAME
}
"dynamic_graph_bridge"
)
target_link_libraries
(
${
DEVICE_NAME
}
dynamic-graph::dynamic-graph
)
target_link_libraries
(
${
DEVICE_NAME
}
dynamic-graph-python::dynamic-graph-python
)
target_link_libraries
(
${
DEVICE_NAME
}
sot-core::sot-core
)
PKG_CONFIG_USE_DEPENDENCY
(
${
DEVICE_NAME
}
pinocchio
)
# target_link_libraries(${DEVICE_NAME} dynamic_graph_bridge ros_bridge ros_inter)
IF
(
UNIX AND NOT APPLE
)
TARGET_LINK_LIBRARIES
(
${
DEVICE_NAME
}
${
Boost_LIBRARIES
}
)
...
...
@@ -80,17 +78,20 @@ MACRO(build_test_controller)
#set_target_properties(${CONTROLLER_NAME} PROPERTIES PREFIX "")
# Link the dynamic library containing the SoT with its dependencies.
PKG_CONFIG_USE_DEPENDENCY
(
${
CONTROLLER_NAME
}
"dynamic-graph"
)
PKG_CONFIG_USE_DEPENDENCY
(
${
CONTROLLER_NAME
}
"dynamic-graph-python"
)
PKG_CONFIG_USE_DEPENDENCY
(
${
CONTROLLER_NAME
}
"sot-core"
)
target_link_libraries
(
${
CONTROLLER_NAME
}
dynamic-graph::dynamic-graph
)
target_link_libraries
(
${
CONTROLLER_NAME
}
dynamic-graph-python::dynamic-graph-python
)
target_link_libraries
(
${
CONTROLLER_NAME
}
sot-core::sot-core
)
PKG_CONFIG_USE_DEPENDENCY
(
${
CONTROLLER_NAME
}
"pinocchio"
)
PKG_CONFIG_USE_DEPENDENCY
(
${
CONTROLLER_NAME
}
"
dynamic_graph_bridge
"
)
#target_link_libraries
(${CONTROLLER_NAME} dynamic_graph_bridge)
ADD_DEPENDENCIES
(
${
CONTROLLER_NAME
}
sot-test-device
)
TARGET_LINK_LIBRARIES
(
${
CONTROLLER_NAME
}
"
ros_bridge
"
)
TARGET_LINK_LIBRARIES
(
${
CONTROLLER_NAME
}
"
ros_interpreter
"
)
TARGET_LINK_LIBRARIES
(
${
CONTROLLER_NAME
}
"
sot-test-device
"
)
#
TARGET_LINK_LIBRARIES(${CONTROLLER_NAME} ros_bridge)
#
TARGET_LINK_LIBRARIES(${CONTROLLER_NAME} ros_interpreter)
TARGET_LINK_LIBRARIES
(
${
CONTROLLER_NAME
}
sot-test-device
)
IF
(
UNIX AND NOT APPLE
)
TARGET_LINK_LIBRARIES
(
${
CONTROLLER_NAME
}
${
Boost_LIBRARIES
}
)
...
...
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