From 1e60647c182c066422e2fa9abecb03c70141e1e0 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 23 Jun 2023 13:49:41 +0900 Subject: [PATCH] fix package.xml/CMakeLists.txt to supress catkin_lint errors --- 3rdparty/aques_talk/package.xml | 2 ++ 3rdparty/assimp_devel/CMakeLists.txt | 1 - 3rdparty/libsiftfast/CMakeLists.txt | 1 - bayesian_belief_networks/CMakeLists.txt | 1 + dialogflow_task_executive/CMakeLists.txt | 10 ++-------- dialogflow_task_executive/package.xml | 3 +-- gdrive_ros/CMakeLists.txt | 5 +---- gdrive_ros/package.xml | 1 - google_chat_ros/CMakeLists.txt | 13 +----------- google_chat_ros/package.xml | 4 ++-- google_chat_ros/test/test_import.py | 1 + .../collada_urdf_jsk_patch/CMakeLists.txt | 1 + .../collada_urdf_jsk_patch/package.xml | 4 +++- nfc_ros/package.xml | 2 ++ pgm_learner/CMakeLists.txt | 4 +--- respeaker_ros/package.xml | 1 + ros_google_cloud_language/CMakeLists.txt | 1 - ros_google_cloud_language/package.xml | 3 +++ ros_speech_recognition/CMakeLists.txt | 2 +- rosping/CMakeLists.txt | 4 ++-- rostwitter/CMakeLists.txt | 3 +-- rostwitter/package.xml | 3 ++- sesame_ros/package.xml | 2 ++ switchbot_ros/CMakeLists.txt | 2 -- switchbot_ros/package.xml | 4 ++-- zdepth_image_transport/CMakeLists.txt | 20 +++++++++---------- zdepth_image_transport/package.xml | 13 ++++++++++++ 27 files changed, 55 insertions(+), 56 deletions(-) diff --git a/3rdparty/aques_talk/package.xml b/3rdparty/aques_talk/package.xml index 2834a9278..2ea60a531 100644 --- a/3rdparty/aques_talk/package.xml +++ b/3rdparty/aques_talk/package.xml @@ -14,6 +14,8 @@ nkf sound_play + rostest + diff --git a/3rdparty/assimp_devel/CMakeLists.txt b/3rdparty/assimp_devel/CMakeLists.txt index 98357ae18..5e6a2d66f 100644 --- a/3rdparty/assimp_devel/CMakeLists.txt +++ b/3rdparty/assimp_devel/CMakeLists.txt @@ -23,7 +23,6 @@ else() INCLUDE_DIRS ${CATKIN_DEVEL_PREFIX}/include/assimp_devel LIBRARIES assimp_devel EXPORTED_TARGETS libassimp_devel - SKIP_CMAKE_CONFIG_GENERATION ) endif() execute_process(COMMAND sed -i s@${${PROJECT_NAME}_VERSION}@3.0.1@ ${CATKIN_DEVEL_PREFIX}/lib/pkgconfig/assimp_devel.pc) diff --git a/3rdparty/libsiftfast/CMakeLists.txt b/3rdparty/libsiftfast/CMakeLists.txt index 96865ced0..fa5e06c95 100644 --- a/3rdparty/libsiftfast/CMakeLists.txt +++ b/3rdparty/libsiftfast/CMakeLists.txt @@ -23,7 +23,6 @@ else() INCLUDE_DIRS ${CATKIN_DEVEL_PREFIX}/include LIBRARIES siftfast EXPORTED_TARGETS libsiftfast - SKIP_CMAKE_CONFIG_GENERATION ) endif() diff --git a/bayesian_belief_networks/CMakeLists.txt b/bayesian_belief_networks/CMakeLists.txt index 23bcc4d9a..2eaa4caf3 100644 --- a/bayesian_belief_networks/CMakeLists.txt +++ b/bayesian_belief_networks/CMakeLists.txt @@ -7,6 +7,7 @@ set(CATKIN_VERSION ${catkin_VERSION}) #this is used in setup.py # Use configure_file because when installing package, this CATKIN_VERSION # environmental variable is not available configure_file(${PROJECT_SOURCE_DIR}/setup.py.in ${PROJECT_SOURCE_DIR}/setup.py) +#catkin_lint: ignore missing_file catkin_python_setup() add_message_files(DIRECTORY msg FILES Result.msg Observation.msg) diff --git a/dialogflow_task_executive/CMakeLists.txt b/dialogflow_task_executive/CMakeLists.txt index 00578495f..c3f194024 100644 --- a/dialogflow_task_executive/CMakeLists.txt +++ b/dialogflow_task_executive/CMakeLists.txt @@ -14,8 +14,6 @@ endif() find_package(catkin REQUIRED COMPONENTS message_generation - std_msgs - actionlib_msgs catkin_virtualenv ) @@ -29,11 +27,7 @@ add_action_files( DialogText.action ) -generate_messages( - DEPENDENCIES - std_msgs - actionlib_msgs -) +generate_messages() catkin_package( CATKIN_DEPENDS message_runtime @@ -81,7 +75,7 @@ install(DIRECTORY launch ) if(CATKIN_ENABLE_TESTING) - find_package(catkin REQUIRED COMPONENTS roslaunch rostest) + find_package(roslaunch rostest REQUIRED) roslaunch_add_file_check(launch) if(NOT (gcc_dump_machine MATCHES "x86_64-.*" OR gcc_dump_machine MATCHES "aarch64-.*")) message(WARNING "pip -i requirements.txt work only with i686, so skipping test for ${gcc_dump_machine}") diff --git a/dialogflow_task_executive/package.xml b/dialogflow_task_executive/package.xml index af2cb0d57..d8a817e0a 100644 --- a/dialogflow_task_executive/package.xml +++ b/dialogflow_task_executive/package.xml @@ -18,11 +18,10 @@ catkin catkin_virtualenv message_generation - actionlib_msgs - std_msgs roslaunch app_manager message_runtime + std_msgs speech_recognition_msgs topic_tools diff --git a/gdrive_ros/CMakeLists.txt b/gdrive_ros/CMakeLists.txt index 51794bda9..4fea8bef0 100644 --- a/gdrive_ros/CMakeLists.txt +++ b/gdrive_ros/CMakeLists.txt @@ -4,7 +4,6 @@ project(gdrive_ros) find_package(catkin REQUIRED COMPONENTS catkin_virtualenv REQUIRED rospy - std_msgs message_generation ) @@ -17,8 +16,6 @@ add_service_files( ) generate_messages( - DEPENDENCIES - std_msgs ) catkin_package( @@ -55,6 +52,6 @@ install(FILES requirements.txt ) if(CATKIN_ENABLE_TESTING) - find_package(catkin REQUIRED COMPONENTS rostest roslaunch) + find_package(rostest roslaunch REQUIRED) roslaunch_add_file_check(launch/gdrive_server.launch) endif() diff --git a/gdrive_ros/package.xml b/gdrive_ros/package.xml index 67e4241da..69095d26e 100644 --- a/gdrive_ros/package.xml +++ b/gdrive_ros/package.xml @@ -15,7 +15,6 @@ catkin rospy message_generation - std_msgs catkin_virtualenv rospy diff --git a/google_chat_ros/CMakeLists.txt b/google_chat_ros/CMakeLists.txt index 4ca3ca801..67a827c78 100644 --- a/google_chat_ros/CMakeLists.txt +++ b/google_chat_ros/CMakeLists.txt @@ -5,8 +5,6 @@ find_package( catkin REQUIRED COMPONENTS catkin_virtualenv REQUIRED rospy - actionlib_msgs - std_msgs message_generation ) @@ -21,11 +19,7 @@ add_action_files( SendMessage.action ) -generate_messages( - DEPENDENCIES - std_msgs - actionlib_msgs - ) +generate_messages() catkin_package() @@ -49,11 +43,6 @@ catkin_install_python( PROGRAMS ${PYTHON_SCRIPT_FILES} DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) -# python requirements -install(FILES requirements.txt - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} - ) - # launch install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} diff --git a/google_chat_ros/package.xml b/google_chat_ros/package.xml index c075bccdc..2d42802b5 100644 --- a/google_chat_ros/package.xml +++ b/google_chat_ros/package.xml @@ -10,14 +10,14 @@ BSD catkin - python3-setuptools + python-setuptools + python3-setuptools message_generation catkin_virtualenv message_runtime rospy - std_msgs gdrive_ros dialogflow_task_executive diff --git a/google_chat_ros/test/test_import.py b/google_chat_ros/test/test_import.py index e6848f805..c64804a69 100644 --- a/google_chat_ros/test/test_import.py +++ b/google_chat_ros/test/test_import.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import unittest import sys diff --git a/jsk_ros_patch/collada_urdf_jsk_patch/CMakeLists.txt b/jsk_ros_patch/collada_urdf_jsk_patch/CMakeLists.txt index 95b75509e..322560351 100644 --- a/jsk_ros_patch/collada_urdf_jsk_patch/CMakeLists.txt +++ b/jsk_ros_patch/collada_urdf_jsk_patch/CMakeLists.txt @@ -25,6 +25,7 @@ find_package(catkin REQUIRED) catkin_package(CATKIN_DEPENDS collada_urdf) +#catkin_lint: ignore immutable_var set(ENV{PKG_CONFIG_PATH} ${CATKIN_DEVEL_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}) add_custom_target(urdf_to_collada ALL DEPENDS ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}/urdf_to_collada) add_custom_command(OUTPUT ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}/urdf_to_collada diff --git a/jsk_ros_patch/collada_urdf_jsk_patch/package.xml b/jsk_ros_patch/collada_urdf_jsk_patch/package.xml index 8390672cd..134af589e 100644 --- a/jsk_ros_patch/collada_urdf_jsk_patch/package.xml +++ b/jsk_ros_patch/collada_urdf_jsk_patch/package.xml @@ -40,7 +40,9 @@ git python-catkin-tools python3-catkin-tools - + + collada_urdf + collada_parser collada_urdf urdf diff --git a/nfc_ros/package.xml b/nfc_ros/package.xml index 43696e90f..a2c96752f 100644 --- a/nfc_ros/package.xml +++ b/nfc_ros/package.xml @@ -17,6 +17,8 @@ message_generation message_runtime + rostest + requirements.txt diff --git a/pgm_learner/CMakeLists.txt b/pgm_learner/CMakeLists.txt index a9cae979f..b558c64df 100644 --- a/pgm_learner/CMakeLists.txt +++ b/pgm_learner/CMakeLists.txt @@ -3,7 +3,6 @@ project(pgm_learner) find_package(catkin REQUIRED COMPONENTS message_generation - std_msgs rospy ) @@ -33,7 +32,6 @@ add_service_files( generate_messages( DEPENDENCIES - std_msgs ) catkin_package() @@ -47,7 +45,7 @@ install( if(CATKIN_ENABLE_TESTING) # python-libpgm-pip did not work with python3 if ("$ENV{ROS_PYTHON_VERSION}" STREQUAL "2") - find_package(catkin REQUIRED COMPONENTS rostest) + find_package(rostest REQUIRED) add_rostest(test/test_discrete_bn.test) add_rostest(test/test_lg_bn.test) endif() diff --git a/respeaker_ros/package.xml b/respeaker_ros/package.xml index 44eef9093..a91564f6a 100644 --- a/respeaker_ros/package.xml +++ b/respeaker_ros/package.xml @@ -24,6 +24,7 @@ python-pyaudio python3-pyaudio + rostest jsk_tools diff --git a/ros_google_cloud_language/CMakeLists.txt b/ros_google_cloud_language/CMakeLists.txt index edf58076f..1edbc088c 100644 --- a/ros_google_cloud_language/CMakeLists.txt +++ b/ros_google_cloud_language/CMakeLists.txt @@ -36,7 +36,6 @@ generate_messages( DEPENDENCIES actionlib_msgs diagnostic_msgs - std_msgs ) catkin_package( diff --git a/ros_google_cloud_language/package.xml b/ros_google_cloud_language/package.xml index ee48d6168..a4181a2f9 100644 --- a/ros_google_cloud_language/package.xml +++ b/ros_google_cloud_language/package.xml @@ -16,8 +16,11 @@ message_runtime rospy + actionlib_msgs diagnostic_msgs + rostest + requirements.txt diff --git a/ros_speech_recognition/CMakeLists.txt b/ros_speech_recognition/CMakeLists.txt index 81d746c7d..96d435940 100644 --- a/ros_speech_recognition/CMakeLists.txt +++ b/ros_speech_recognition/CMakeLists.txt @@ -49,7 +49,7 @@ install(FILES requirements.txt ) if(CATKIN_ENABLE_TESTING) - find_package(catkin REQUIRED COMPONENTS rostest roslaunch) + find_package(rostest roslaunch REQUIRED) add_rostest(test/sample_ros_speech_recognition.test DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv ) diff --git a/rosping/CMakeLists.txt b/rosping/CMakeLists.txt index 33c3af3a1..de150bbae 100644 --- a/rosping/CMakeLists.txt +++ b/rosping/CMakeLists.txt @@ -44,6 +44,6 @@ install(DIRECTORY test DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} USE_SOURCE_PERMISSIONS ) -if (NOT $ENV{ROS_DISTRO} STREQUAL "indigo") +if (CATKIN_ENABLE_TESTING AND (NOT $ENV{ROS_DISTRO} STREQUAL "indigo")) add_rostest(test/test-rosping.test) -endif(NOT $ENV{ROS_DISTRO} STREQUAL "indigo") +endif(CATKIN_ENABLE_TESTING AND (NOT $ENV{ROS_DISTRO} STREQUAL "indigo")) diff --git a/rostwitter/CMakeLists.txt b/rostwitter/CMakeLists.txt index 18d7a639e..aeb155475 100644 --- a/rostwitter/CMakeLists.txt +++ b/rostwitter/CMakeLists.txt @@ -7,7 +7,6 @@ find_package(catkin REQUIRED COMPONENTS dynamic_reconfigure message_generation rospy - std_msgs mk ) @@ -20,7 +19,7 @@ add_action_files( generate_messages( - DEPENDENCIES actionlib_msgs std_msgs) + DEPENDENCIES actionlib_msgs) generate_dynamic_reconfigure_options( cfg/TweetImageServer.cfg diff --git a/rostwitter/package.xml b/rostwitter/package.xml index 81f27e680..f64d1dc98 100644 --- a/rostwitter/package.xml +++ b/rostwitter/package.xml @@ -14,7 +14,6 @@ actionlib_msgs dynamic_reconfigure rospy - std_msgs message_generation mk git @@ -31,6 +30,8 @@ python-simplejson python3-simplejson + actionlib_msgs + rostest diff --git a/sesame_ros/package.xml b/sesame_ros/package.xml index 11f03cb61..3e38dcc38 100644 --- a/sesame_ros/package.xml +++ b/sesame_ros/package.xml @@ -21,6 +21,8 @@ message_runtime + rostest + requirements.txt diff --git a/switchbot_ros/CMakeLists.txt b/switchbot_ros/CMakeLists.txt index c501c7658..e5426bb6a 100644 --- a/switchbot_ros/CMakeLists.txt +++ b/switchbot_ros/CMakeLists.txt @@ -5,7 +5,6 @@ find_package( catkin REQUIRED COMPONENTS message_generation actionlib_msgs - std_msgs ) catkin_python_setup() @@ -24,7 +23,6 @@ add_action_files( generate_messages( DEPENDENCIES actionlib_msgs - std_msgs ) catkin_package() diff --git a/switchbot_ros/package.xml b/switchbot_ros/package.xml index eec7f65c8..d045b20a5 100644 --- a/switchbot_ros/package.xml +++ b/switchbot_ros/package.xml @@ -17,7 +17,6 @@ actionlib actionlib_msgs message_generation - std_msgs python-requests python3-requests @@ -25,7 +24,8 @@ actionlib_msgs message_runtime rospy - std_msgs + + actionlib_msgs diff --git a/zdepth_image_transport/CMakeLists.txt b/zdepth_image_transport/CMakeLists.txt index beea8481b..50c141a55 100644 --- a/zdepth_image_transport/CMakeLists.txt +++ b/zdepth_image_transport/CMakeLists.txt @@ -12,12 +12,12 @@ find_package(catkin REQUIRED ) if("$ENV{ROS_DISTRO}" STRGREATER "kinetic") - find_library(zdepth_LIB zdepth PATH_SUFFIXES zdepth) - find_library(zstd_LIB zstd PATH_SUFFIXES zdepth) - set(zdepth_LIBRARIES ${zdepth_LIB} ${zstd_LIB}) - find_file(zdepth_INCLUDE zdepth.hpp PATH_SUFFIXES zdepth) - get_filename_component(zdepth_PATH ${zdepth_INCLUDE} DIRECTORY) - get_filename_component(zdepth_INCLUDE_DIRS ${zdepth_PATH} DIRECTORY) + find_library(${PROJECT_NAME}_zdepth_LIB zdepth PATH_SUFFIXES zdepth) + find_library(${PROJECT_NAME}_zstd_LIB zstd PATH_SUFFIXES zdepth) + set(${PROJECT_NAME}_zdepth_LIBRARIES ${${PROJECT_NAME}_zdepth_LIB} ${${PROJECT_NAME}_zstd_LIB}) + find_file(${PROJECT_NAME}_zdepth_INCLUDE zdepth.hpp PATH_SUFFIXES zdepth) + get_filename_component(${PROJECT_NAME}_zdepth_PATH ${${PROJECT_NAME}_zdepth_INCLUDE} DIRECTORY) + get_filename_component(${PROJECT_NAME}_zdepth_INCLUDE_DIRS ${${PROJECT_NAME}_zdepth_PATH} DIRECTORY) endif() add_message_files( @@ -40,17 +40,17 @@ catkin_package( sensor_msgs std_msgs DEPENDS - zdepth + ${PROJECT_NAME}_zdepth ) if("$ENV{ROS_DISTRO}" STRGREATER "kinetic") - include_directories(include ${catkin_INCLUDE_DIRS} ${zdepth_INCLUDE_DIRS}) + include_directories(include ${catkin_INCLUDE_DIRS} ${${PROJECT_NAME}_zdepth_INCLUDE_DIRS}) add_executable(zdepth_test src/test/zdepth_test.cpp) - target_link_libraries(zdepth_test ${catkin_LIBRARIES} ${zdepth_LIBRARIES}) + target_link_libraries(zdepth_test ${catkin_LIBRARIES} ${${PROJECT_NAME}_zdepth_LIBRARIES}) add_library(${PROJECT_NAME} src/manifest.cpp src/zdepth_publisher.cpp src/zdepth_subscriber.cpp) - target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${zdepth_LIBRARIES}) + target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${${PROJECT_NAME}_zdepth_LIBRARIES}) add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_generate_messages_cpp) install(TARGETS zdepth_test diff --git a/zdepth_image_transport/package.xml b/zdepth_image_transport/package.xml index 390876a1f..a298ad4e9 100644 --- a/zdepth_image_transport/package.xml +++ b/zdepth_image_transport/package.xml @@ -25,6 +25,19 @@ sensor_msgs std_msgs zdepth + + pluginlib + roscpp + sensor_msgs + std_msgs + zdepth + + std_msgs + sensor_msgs + roscpp + pluginlib + image_transport +