OPT4SMART/ros2-vicon-receiver

Humble build error

biagio-trimarchi opened this issue · 1 comments

When building the package with ROS2 Humble, I get the following error

CMake Deprecation Warning at /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_target_interfaces.cmake:32 (message):
  Use rosidl_get_typesupport_target() and target_link_libraries() instead of
  rosidl_target_interfaces()
Call Stack (most recent call first):
  CMakeLists.txt:44 (rosidl_target_interfaces)


CMake Deprecation Warning at /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_target_interfaces.cmake:32 (message):
  Use rosidl_get_typesupport_target() and target_link_libraries() instead of
  rosidl_target_interfaces()
Call Stack (most recent call first):
  CMakeLists.txt:44 (rosidl_target_interfaces)


CMake Error at /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_target_interfaces.cmake:55 (if):
  if given arguments:

    "\$<BUILD_INTERFACE:/home/docker-dev/ws/LDC_2023/ROS2_code/build/vicon_receiver/rosidl_typesupport_fastrtps_cpp>" "\$<INSTALL_INTERFACE:include/vicon_receiver>"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:44 (rosidl_target_interfaces)

The first two are deprecation warning, while the last one is a CMake error.

As suggested in one of your pull requests, a quick-fix is to change line 45 of the CMakeFile:

Original:

${PROJECT_NAME} ${typesupport_impl}

Quick-fix:

${PROJECT_NAME} "rosidl_typesupport_cpp"

In any case, the rosidl_target_interfaces is deprecated and should be changed in later commits.

Thank you, we fixed the files and now everything should work fine!