reorganize env hooks

This commit is contained in:
Troy Straszheim 2012-01-11 14:51:06 +00:00
parent 8357441f2a
commit 57f2d6676a
8 changed files with 13 additions and 64 deletions

View File

@ -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

View File

@ -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

View File

@ -3,14 +3,13 @@ project(ros)
find_package(catkin)
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
# rosunit are symlinked into build/bin, and can be found by things like
# add_gtest(), which is called from within lower-level CMakeLists.txts.
catkin_export_python()
foreach(subdir
env-hooks
core/roslib
tools/rosbash
)

View File

@ -0,0 +1,2 @@
. @CMAKE_INSTALL_PREFIX@/ros/tools/rosbash/rosbash

View File

@ -0,0 +1,2 @@
. @CMAKE_CURRENT_SOURCE_DIR@/rosbash

View File

@ -0,0 +1,2 @@
. @CMAKE_CURRENT_SOURCE_DIR@/roszsh

View File

@ -0,0 +1,2 @@
. @CMAKE_INSTALL_PREFIX@/ros/tools/rosbash/roszsh

View File

@ -8,3 +8,7 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/bin/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)
endif()
catkin_add_env_hooks(15.rosbash
SHELLS bash zsh
)