text stringlengths 0 111 |
|---|
${sawKeyboard_INCLUDE_DIR}) |
link_directories (${sawControllers_LIBRARY_DIR} |
${sawKeyboard_LIBRARY_DIR}) |
set (sawControllers_EXAMPLES |
osaGCExample |
osaPDGCExample |
mtsGCExample) |
foreach (_example ${sawControllers_EXAMPLES}) |
add_executable (${_example} ${_example}.cpp) |
target_link_libraries (${_example} PRIVATE |
${sawControllers_LIBRARIES} |
${cisst_LIBRARIES} |
) |
set_target_properties (${_example} PROPERTIES |
FOLDER "sawControllers") |
endforeach () |
# examples that also need sawKeyboard |
target_link_libraries (mtsGCExample PRIVATE ${sawKeyboard_LIBRARIES}) |
install (TARGETS ${sawControllers_EXAMPLES} COMPONENT sawControllers-Examples |
RUNTIME DESTINATION bin |
LIBRARY DESTINATION lib |
ARCHIVE DESTINATION lib) |
# copy configuration XML to the executable directory |
# add_custom_target (sawControllers_configPID ALL |
# COMMAND ${CMAKE_COMMAND} -E copy_if_different |
# ${CMAKE_CURRENT_SOURCE_DIR}/configPID.xml |
# ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/configPID.xml |
# SOURCES configPID.xml |
# COMMENT "Copying configPID.xml to the binary directory") |
endif (sawControllers_FOUND AND sawKeyboard_FOUND) |
# |
# (C) Copyright 2025-2026 Johns Hopkins University (JHU), All Rights Reserved. |
# |
# --- begin cisst license - do not edit --- |
# |
# This software is provided "as is" under an open source license, with |
# no warranty. The complete license can be found in license.txt and |
# http://www.cisst.org/cisst/license.txt. |
# |
# --- end cisst license --- |
cmake_minimum_required (VERSION 3.16) |
project (saw_controllers_ros VERSION 2.4.0) |
# first test for ROS1 |
set (ROS1_depends cisst_ros_crtk roscpp roslib) |
find_package (catkin QUIET |
COMPONENTS ${ROS1_depends}) |
# ROS 1 |
if (catkin_FOUND) |
set (ROS_VERSION 1) |
catkin_package ( |
INCLUDE_DIRS include |
LIBRARIES saw_controllers_ros |
CATKIN_DEPENDS cisst_ros_crtk roscpp roslib) |
include_directories (${catkin_INCLUDE_DIRS}) |
else (catkin_FOUND) |
# look for ROS2 |
find_package (ament_cmake QUIET) |
if (ament_cmake_FOUND) |
find_package (ament_cmake_python REQUIRED) |
set (ROS_VERSION 2) |
set (ROS2_depends |
rclcpp std_msgs std_srvs geometry_msgs sensor_msgs diagnostic_msgs |
tf2_ros tf2_msgs cisst_msgs crtk_msgs cisst_ros_bridge cisst_ros_crtk) |
foreach (_dep ${ROS2_depends}) |
find_package (${_dep} REQUIRED) |
endforeach () |
endif (ament_cmake_FOUND) |
endif (catkin_FOUND) |
# find cisst and make sure the required libraries have been compiled |
set (REQUIRED_CISST_LIBRARIES |
cisstCommon |
cisstCommonQt |
cisstVector |
cisstVectorQt |
cisstOSAbstraction |
cisstMultiTask |
cisstMultiTaskQt |
cisstParameterTypes |
cisstParameterTypesQt |
) |
find_package (cisst 1.5 REQUIRED COMPONENTS ${REQUIRED_CISST_LIBRARIES}) |
# sawControllers has been compiled within cisst, we should find it automatically |
find_package (sawControllers 2.4.0) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.