Skip to content

Commit

Permalink
Ensure EXTRA_OECMAKE overrides correctly handle multiple cmake -D opt…
Browse files Browse the repository at this point in the history
…ions

Signed-off-by: Stephen Street <stephen@redrocketcomputing.com>
  • Loading branch information
sgstreet committed Oct 3, 2024
1 parent 59c45e0 commit 75fe390
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 6 additions & 1 deletion meta-ros-common/classes/ros_cmake.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

inherit cmake

EXTRA_OECMAKE:prepend = "\
EXTRA_OECMAKE:prepend:class-target = "\
-DCMAKE_PREFIX_PATH='${STAGING_DIR_HOST}${ros_prefix};${STAGING_DIR_HOST}${prefix}' \
-DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \
-DCMAKE_MODULE_PATH='${STAGING_DIR_HOST}${ros_datadir}/cmake/Modules/' \
Expand All @@ -13,3 +13,8 @@ EXTRA_OECMAKE:prepend:class-native = "\
-DCMAKE_PREFIX_PATH='${STAGING_DIR_NATIVE}${ros_prefix};${STAGING_DIR_NATIVE}${prefix}' \
-DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \
"

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_INSTALL_PREFIX:PATH='${ros_prefix}' \
"
9 changes: 8 additions & 1 deletion meta-ros2/classes/ros_ament_cmake.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ 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/python3.12/site-packages:"

FILES:${PN}:prepend = " \
${datadir}/ament_index \
"

EXTRA_OECMAKE:prepend = "\
EXTRA_OECMAKE:prepend:class-target = "\
-DCMAKE_PREFIX_PATH='${STAGING_DIR_HOST}${ros_prefix};${STAGING_DIR_HOST}${prefix}' \
-DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \
"
Expand All @@ -38,3 +40,8 @@ EXTRA_OECMAKE:prepend:class-native = "\
-DCMAKE_PREFIX_PATH='${ros_prefix}' \
-DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \
"

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_INSTALL_PREFIX:PATH='${ros_prefix}' \
"

0 comments on commit 75fe390

Please sign in to comment.