Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Patch drake-extras.cmake with comments in #7
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed Mar 6, 2024
1 parent 9d53a2d commit f1ce9c5
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion drake-extras.cmake
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
find_package(drake REQUIRED)
# The code will search for the upstream drake-config.cmake file
# installed under the root of the ROS installation + /opt/drake
# (i.e /opt/ros/rolling/opt/drake ).
#
# Long explanation of how this file works can be found in:
# https://github.com/RobotLocomotion/ros-drake-vendor/issues/7#issuecomment-1979757703

# drake_DIR will return the absolute path to the ROS package
# of drake (share/drake/cmake under the ROS root installation)
# The relative path should drive us to the root of the drake
# upstream installation done under ROS.
set(_drake_path "${drake_DIR}/../../../opt/drake")

# Since the upstream installation has the same CMake module name
# than the ROS package we need to unset the cache variable
# that points to the ROS package to be sure to force the
# find_package to find the drake config module under the
# paths
unset(drake_DIR CACHE)

find_package(drake PATHS ${_drake_path} NO_DEFAULT_PATH)

0 comments on commit f1ce9c5

Please sign in to comment.