ANYbotics / grid_map

Universal grid map library for mobile robotic mapping
BSD 3-Clause "New" or "Revised" License
2.53k stars 794 forks source link

Bugfix use old style include directories for filters #442

Closed Ryanf55 closed 4 months ago

Ryanf55 commented 4 months ago

Purpose

Use old-style CMake variables as a patch till this upstream issue makes it into humble binaries: https://github.com/ros/filters/pull/70

Cause

https://github.com/ANYbotics/grid_map/pull/404/files#diff-217de7f0d7eec88dce2cada8716bd30748cf9ad20d1211c56501a2acb56666bbL28

This PR forgot to add the include directories from filters, probably because there were no targets. I'm not sure how it builds on rolling and not humble. This patch can be replaced with a proper target_link_libraries call soon.

Effect

It's blocking CI from passing in this PR: https://github.com/ANYbotics/grid_map/actions/runs/7943206475/job/21687293385?pr=440#step:6:25

Upstream variables

$ cat /opt/ros/rolling/share/filters/cmake/ament_cmake_export_include_directories-extras.cmake 
# generated from ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directories-extras.cmake.in

set(_exported_include_dirs "${filters_DIR}/../../../include")

# append include directories to filters_INCLUDE_DIRS
# warn about not existing paths
if(NOT _exported_include_dirs STREQUAL "")
  find_package(ament_cmake_core QUIET REQUIRED)
  foreach(_exported_include_dir ${_exported_include_dirs})
    if(NOT IS_DIRECTORY "${_exported_include_dir}")
      message(WARNING "Package 'filters' exports the include directory '${_exported_include_dir}' which doesn't exist")
    endif()
    normalize_path(_exported_include_dir "${_exported_include_dir}")
    list(APPEND filters_INCLUDE_DIRS "${_exported_include_dir}")
  endforeach()
endif()

You can see the variable we need to use is filters_INCLUDE_DIRS

Ryanf55 commented 4 months ago

@mergifyio backport iron

mergify[bot] commented 4 months ago

backport iron

✅ Backports have been created

* [#446 Bugfix use old style include directories for filters (backport #442)](https://github.com/ANYbotics/grid_map/pull/446) has been created for branch `iron`
Ryanf55 commented 4 months ago

@mergifyio backport humble

mergify[bot] commented 4 months ago

backport humble

✅ Backports have been created

* [#447 Bugfix use old style include directories for filters (backport #442)](https://github.com/ANYbotics/grid_map/pull/447) has been created for branch `humble`