message: CMake: Simplify lists file.
diff: @@ -15,58 +15,28 @@ find_package(Franka REQUIRED)
  catkin_package(CATKIN_DEPENDS sensor_msgs roscpp)
  -add_executable(franka_joint_state_publisher
  - src/franka_joint_state_publisher.cpp
  +set(EXECUTABLES
  + franka_joint_state_publisher
  + franka_cartesian_motion_example
  + franka_joint_motion_example
  )
  -add_dependencies(franka_joint_state_publisher
  - ${${PROJECT_NAME}_EXPORTED_TARGETS}
  - ${catkin_EXPORTED_TARGETS}
  -)
  -
  -target_link_libraries(franka_joint_state_publisher
  - ${catkin_LIBRARIES}
  - Franka::franka
  -)
  -target_include_directories(franka_joint_state_publisher PUBLIC
  - ${catkin_INCLUDE_DIRS}
  -)
  -
  -add_executable(franka_cartesian_motion_example
  - src/franka_cartesian_motion_example.cpp
  -)
  -
  -add_dependencies(franka_cartesian_motion_example
  - ${${PROJECT_NAME}_EXPORTED_TARGETS}
  - ${catkin_EXPORTED_TARGETS}
  +foreach(executable ${EXECUTABLES})
  + add_executable(${executable}
  + src/${executable}.cpp
  )
  -
  -target_link_libraries(franka_cartesian_motion_example
  - ${catkin_LIBRARIES}
  - Franka::franka
  -)
  -
  -target_include_directories(franka_cartesian_motion_example PUBLIC
  - ${catkin_INCLUDE_DIRS}
  -)
  -
  -add_executable(franka_joint_motion_example
  - src/franka_joint_motion_example.cpp
  -)
  -
  -add_dependencies(franka_joint_motion_example
  + add_dependencies(${executable}
  ${${PROJECT_NAME}_EXPORTED_TARGETS}
  ${catkin_EXPORTED_TARGETS}
  )
  -
  -target_link_libraries(franka_joint_motion_example
  + target_link_libraries(${executable}
  ${catkin_LIBRARIES}
  Franka::franka
  )
  -
  -target_include_directories(franka_joint_motion_example PUBLIC
  + target_include_directories(${executable} PUBLIC
  ${catkin_INCLUDE_DIRS}
  )
  +endforeach()
  ## Tools
  file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
  @@ -78,5 +48,5 @@ include(ClangTools)
  add_format_target(franka_visualization FILES ${SOURCES} ${HEADERS})
  add_tidy_target(franka_visualization
  FILES ${SOURCES}
  - DEPENDS franka_joint_state_publisher franka_joint_motion_example franka_cartesian_motion_example
  + DEPENDS ${EXECUTABLES}
  )
  