Skip to content

Commit

Permalink
{common,ros2} Allow alternative ROS install paths
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Street <[email protected]>
  • Loading branch information
sgstreet committed Nov 13, 2024
1 parent 51c47ec commit f60c234
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion meta-ros-common/classes/ros_opt_prefix.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved
#

ros_prefix ?= "${base_prefix}/opt/ros/${ROS_DISTRO}"
ros_base_prefix ?= "/opt/ros/${ROS_DISTRO}"
ros_prefix = "${base_prefix}${ros_base_prefix}"

ros_bindir = "${ros_prefix}/bin"
ros_sbindir = "${ros_prefix}/sbin"
Expand Down
4 changes: 2 additions & 2 deletions meta-ros2/classes/ros_ament_cmake.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export AMENT_PREFIX_PATH="${STAGING_DIR_HOST}${prefix};${STAGING_DIR_NATIVE}${pr

inherit cmake python3native

PYTHONPATH:prepend:class-nativesdk = "${STAGING_DIR_NATIVE}/opt/ros/${ROS_DISTRO}/lib/python${PYTHON_BASEVERSION}/site-packages:"
PYTHONPATH:prepend:class-nativesdk = "${STAGING_DIR_NATIVE}${ros_base_prefix}/lib/python${PYTHON_BASEVERSION}/site-packages:"

FILES:${PN}:prepend = " \
${datadir}/ament_index \
Expand All @@ -42,6 +42,6 @@ EXTRA_OECMAKE:prepend:class-native = "\
"

EXTRA_OECMAKE:prepend:class-nativesdk = "\
-DCMAKE_PREFIX_PATH='${STAGING_DIR_NATIVE}/opt/ros/${ROS_DISTRO};${STAGING_DIR_NATIVE}${ros_prefix};${STAGING_DIR_NATIVE}${prefix}' \
-DCMAKE_PREFIX_PATH='${STAGING_DIR_NATIVE}${ros_base_prefix};${STAGING_DIR_NATIVE}${ros_prefix};${STAGING_DIR_NATIVE}${prefix}' \
-DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \
"

0 comments on commit f60c234

Please sign in to comment.