Skip to content

Commit

Permalink
Drop ament linting for now
Browse files Browse the repository at this point in the history
We'll later use our own specialized configuration via `pre-commit`.
Also clean-up the CMakeLists.txt a little.
  • Loading branch information
stefanscherzinger committed Apr 17, 2024
1 parent 9b5eeeb commit c188897
Showing 1 changed file with 36 additions and 35 deletions.
71 changes: 36 additions & 35 deletions src/schunk_gripper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,80 +74,81 @@ ament_export_dependencies(rosidl_default_runtime)
ament_export_include_directories(include)
ament_export_dependencies(sensor_msgs control_msgs action_msgs diagnostic_msgs)

# Declare a C++ library for schunk_gripper_driver
#--------------------------------------------------------------------------------
# Build
#--------------------------------------------------------------------------------

# The driver
add_library(schunk_gripper_driver SHARED
src/schunk_gripper_wrapper.cpp
src/schunk_gripper_lib.cpp
src/communication.cpp
)

# Define compilation definition for schunk_gripper_driver
target_compile_definitions(schunk_gripper_driver
PRIVATE "COMPOSITION_BUILDING_DLL"
)

# Link libraries to schunk_gripper_driver
target_link_libraries(schunk_gripper_driver
${CURL_LIBRARIES}
${cpp_typesupport_target}
)

# Add dependencies for schunk_gripper_driver
ament_target_dependencies(schunk_gripper_driver
"rclcpp" "sensor_msgs" "control_msgs" "rclcpp_action" "rclcpp_components" "diagnostic_updater" "diagnostic_msgs"
rclcpp
sensor_msgs
control_msgs
rclcpp_action
rclcpp_components
diagnostic_updater
diagnostic_msgs
)
rosidl_get_typesupport_target(cpp_typesupport_target "${PROJECT_NAME}" "rosidl_typesupport_cpp")
target_link_libraries(schunk_gripper_driver "${cpp_typesupport_target}")
rosidl_get_typesupport_target(cpp_typesupport_target "${PROJECT_NAME}" "rosidl_typesupport_cpp")
# Register schunk_gripper_driver as a component node
rclcpp_components_register_nodes(schunk_gripper_driver "SchunkGripperNode")

# Link libraries to schunk_gripper_driver
target_link_libraries(schunk_gripper_driver
${CURL_LIBRARIES}
# Example
add_executable(schunk_gripper_example
src/gripper_example.cpp
)

# Install schunk_gripper_example executable
add_executable(schunk_gripper_example src/gripper_example.cpp)
ament_target_dependencies(schunk_gripper_example
"rclcpp" "sensor_msgs" "control_msgs" "rclcpp_action" "rclcpp_components" "diagnostic_updater" "diagnostic_msgs"
rclcpp
sensor_msgs
control_msgs
rclcpp_action
rclcpp_components
diagnostic_updater
diagnostic_msgs
)
target_link_libraries(schunk_gripper_example
"${cpp_typesupport_target}"
schunk_gripper_driver
)

target_link_libraries(schunk_gripper_example "${cpp_typesupport_target}" schunk_gripper_driver)

# Install targets
#--------------------------------------------------------------------------------
# Install
#--------------------------------------------------------------------------------
install(TARGETS
schunk_gripper_driver
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

install(TARGETS
schunk_gripper_example
DESTINATION lib/${PROJECT_NAME}
)

install(DIRECTORY
include/
DESTINATION include
)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights
# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
# the following line skips cpplint (only works in a git repo)
# comment the line when this package is in a git repo and when
# a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()

# Install launch files
install(DIRECTORY
launch
DESTINATION share/${PROJECT_NAME}/
)

#--------------------------------------------------------------------------------
# Test
#--------------------------------------------------------------------------------
if(BUILD_TESTING)
endif()

# Ament package configuration
ament_package()
Expand Down

0 comments on commit c188897

Please sign in to comment.