reorganize env hooks
This commit is contained in:
parent
8357441f2a
commit
57f2d6676a
|
@ -1,33 +0,0 @@
|
||||||
#
|
|
||||||
# Buildspace ROS env file.
|
|
||||||
# This file was automatically generated.
|
|
||||||
#
|
|
||||||
export ROS_ROOT=@CMAKE_SOURCE_DIR@/ros
|
|
||||||
export ROS_TEST_RESULTS_DIR=@CMAKE_BINARY_DIR@/test_results
|
|
||||||
export ROS_PACKAGE_PATH=@CMAKE_SOURCE_DIR@:$ROS_PACKAGE_PATH
|
|
||||||
export PATH=@CMAKE_SOURCE_DIR@/ros/bin:$PATH
|
|
||||||
if [ ! "$ROS_MASTER_URI" ] ; then
|
|
||||||
export ROS_MASTER_URI=http://localhost:11311
|
|
||||||
fi
|
|
||||||
|
|
||||||
_rosbash_load () {
|
|
||||||
/bin/echo "Loading rosbash for shell $SHELL"
|
|
||||||
case "$SHELL" in
|
|
||||||
*bash)
|
|
||||||
. @CMAKE_CURRENT_SOURCE_DIR@/tools/rosbash/rosbash
|
|
||||||
;;
|
|
||||||
*zsh)
|
|
||||||
. @CMAKE_CURRENT_SOURCE_DIR@/tools/rosbash/roszsh
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$-" in
|
|
||||||
*i*)
|
|
||||||
_rosbash_load $0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
29
10.ros.sh.in
29
10.ros.sh.in
|
@ -1,29 +0,0 @@
|
||||||
#
|
|
||||||
# Installed ROS env file
|
|
||||||
# This file was automatically generated.
|
|
||||||
#
|
|
||||||
export ROS_ROOT=@CMAKE_INSTALL_PREFIX@/share/ros
|
|
||||||
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:@CMAKE_INSTALL_PREFIX@/share
|
|
||||||
if [ ! "$ROS_MASTER_URI" ] ; then
|
|
||||||
export ROS_MASTER_URI=http://localhost:11311
|
|
||||||
fi
|
|
||||||
|
|
||||||
_rosbash_load () {
|
|
||||||
case "$SHELL" in
|
|
||||||
*bash)
|
|
||||||
. @CMAKE_CURRENT_SOURCE_DIR@/tools/rosbash/rosbash
|
|
||||||
;;
|
|
||||||
*zsh)
|
|
||||||
. @CMAKE_CURRENT_SOURCE_DIR@/tools/rosbash/roszsh
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$-" in
|
|
||||||
*i*)
|
|
||||||
_rosbash_load
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -3,14 +3,13 @@ project(ros)
|
||||||
find_package(catkin)
|
find_package(catkin)
|
||||||
find_package(Boost COMPONENTS thread)
|
find_package(Boost COMPONENTS thread)
|
||||||
|
|
||||||
catkin_add_env_hooks(10.ros.buildspace.sh 10.ros.sh)
|
|
||||||
|
|
||||||
# Must call catkin_export_python() early, to ensure that things like
|
# Must call catkin_export_python() early, to ensure that things like
|
||||||
# rosunit are symlinked into build/bin, and can be found by things like
|
# rosunit are symlinked into build/bin, and can be found by things like
|
||||||
# add_gtest(), which is called from within lower-level CMakeLists.txts.
|
# add_gtest(), which is called from within lower-level CMakeLists.txts.
|
||||||
catkin_export_python()
|
catkin_export_python()
|
||||||
|
|
||||||
foreach(subdir
|
foreach(subdir
|
||||||
|
env-hooks
|
||||||
core/roslib
|
core/roslib
|
||||||
tools/rosbash
|
tools/rosbash
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
. @CMAKE_INSTALL_PREFIX@/ros/tools/rosbash/rosbash
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
. @CMAKE_CURRENT_SOURCE_DIR@/rosbash
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
. @CMAKE_CURRENT_SOURCE_DIR@/roszsh
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
. @CMAKE_INSTALL_PREFIX@/ros/tools/rosbash/roszsh
|
||||||
|
|
|
@ -8,3 +8,7 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/bin/rosrun)
|
||||||
message(STATUS " Making toplevel symlink for bash script rosrun")
|
message(STATUS " Making toplevel symlink for bash script rosrun")
|
||||||
execute_process(COMMAND /bin/ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/scripts/rosrun ${CMAKE_BINARY_DIR}/bin/rosrun)
|
execute_process(COMMAND /bin/ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/scripts/rosrun ${CMAKE_BINARY_DIR}/bin/rosrun)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
catkin_add_env_hooks(15.rosbash
|
||||||
|
SHELLS bash zsh
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue