WIP ros2_distro.bbclass: Fix up build paths in parent_prefix_path files if building for target

This commit is contained in:
Herb Kuta 2019-05-29 16:27:43 -07:00
parent 998529ade5
commit 20e5531474
1 changed files with 11 additions and 0 deletions

View File

@ -10,3 +10,14 @@ def ros_distro__get_component_type(component, d):
# *.cmake files has hardcoded sysroot-s in them. We assume this is only an issue with ROS 2. # *.cmake files has hardcoded sysroot-s in them. We assume this is only an issue with ROS 2.
SSTATE_SCAN_FILES_append = " *.cmake" SSTATE_SCAN_FILES_append = " *.cmake"
# The parent_prefix_path files are used on the target => remove the build tree from the paths. We assume this is only an issue
# with ROS 2.
do_install_append_class-target() {
if [ -d ${D}${datadir}/ament_index/resource_index/parent_prefix_path ]; then
find ${D}${datadir}/ament_index/resource_index/parent_prefix_path -type f \
| xargs --no-run-if-empty sed -i -e 's@${STAGING_DIR_HOST}/@/@g' -e 's@${STAGING_DIR_NATIVE}/@/@g'
else
true
fi
}