moved env hooks from ros to roslib, made ros a metapackage

This commit is contained in:
Dirk Thomas 2012-11-04 04:18:52 +00:00
parent c9cda0d466
commit cb23ce87b2
4 changed files with 26 additions and 32 deletions

View File

@ -1,4 +1,4 @@
REM generated from ros/env-hooks/10.ros.bat.in
REM generated from ros/env-hooks/10.ros.bat.em
REM scrub old ROS bin dirs, to avoid accidentally finding the wrong executables
set PATH=`python -c "import os; print(os.pathsep.join([x for x in \"$PATH\".split(os.pathsep) if not any([d for d in ['cturtle', 'diamondback', 'electric', 'fuerte'] if d in x])]))"`
@ -21,16 +21,17 @@ setlocal EnableDelayedExpansion
set ROS_PACKAGE_PATH_PARENTS=
for /f %%a in ('python _parent_package_path.py') do set ROS_PACKAGE_PATH_PARENTS=!ROS_PACKAGE_PATH_PARENTS!%%a
if [@BUILDSPACE@]==[true] (
set ROS_PACKAGE_PATH=@CMAKE_SOURCE_DIR@$ROS_PACKAGE_PATH_PARENTS
set ROS_ROOT=@CMAKE_CURRENT_SOURCE_DIR@
set ROS_ETC_DIR=@CATKIN_BUILD_PREFIX@/@CATKIN_PACKAGE_ETC_DESTINATION@
)
if [@INSTALLSPACE@]==[true] (
set ROS_PACKAGE_PATH=@CMAKE_INSTALL_PREFIX@/share:@CMAKE_INSTALL_PREFIX@/stacks$ROS_PACKAGE_PATH_PARENTS
set ROS_ROOT=@CMAKE_INSTALL_PREFIX@/@CATKIN_PACKAGE_SHARE_DESTINATION@
set ROS_ETC_DIR=@CMAKE_INSTALL_PREFIX@/@CATKIN_PACKAGE_ETC_DESTINATION@
)
@[if BUILDSPACE]@
REM env variables in buildspace
set ROS_PACKAGE_PATH=@(CMAKE_SOURCE_DIR)$ROS_PACKAGE_PATH_PARENTS
set ROS_ROOT=@(CMAKE_CURRENT_SOURCE_DIR)
set ROS_ETC_DIR=@(CATKIN_BUILD_PREFIX)/@(CATKIN_PACKAGE_ETC_DESTINATION)
@[else]@
REM env variables in installspace
set ROS_PACKAGE_PATH=@(CMAKE_INSTALL_PREFIX)/share:@(CMAKE_INSTALL_PREFIX)/stacks$ROS_PACKAGE_PATH_PARENTS
set ROS_ROOT=@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_SHARE_DESTINATION)
set ROS_ETC_DIR=@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_ETC_DESTINATION)
@[end if]@
del _parent_package_path.py

View File

@ -1,4 +1,4 @@
# generated from ros/env-hooks/10.ros.sh.in
# generated from ros/env-hooks/10.ros.sh.em
# scrub old ROS bin dirs, to avoid accidentally finding the wrong executables
export PATH=`python -c "import os; print(os.pathsep.join([x for x in \"$PATH\".split(os.pathsep) if not any([d for d in ['cturtle', 'diamondback', 'electric', 'fuerte'] if d in x])]))"`
@ -29,11 +29,12 @@ EOF
)
export ROS_PACKAGE_PATH=`python -c "$PYTHON_CODE_BUILD_ROS_PACKAGE_PATH"`
if @BUILDSPACE@; then
export ROS_ROOT=@CMAKE_CURRENT_SOURCE_DIR@/..
export ROS_ETC_DIR=@CATKIN_BUILD_PREFIX@/@CATKIN_PACKAGE_ETC_DESTINATION@
fi
if @INSTALLSPACE@; then
export ROS_ROOT=@CMAKE_INSTALL_PREFIX@/@CATKIN_PACKAGE_SHARE_DESTINATION@
export ROS_ETC_DIR=@CMAKE_INSTALL_PREFIX@/@CATKIN_PACKAGE_ETC_DESTINATION@
fi
@[if BUILDSPACE]@
# env variables in buildspace
export ROS_ROOT=@(CMAKE_CURRENT_SOURCE_DIR)/../..
export ROS_ETC_DIR=@(CATKIN_BUILD_PREFIX)/@(CATKIN_GLOBAL_ETC_DESTINATION)/ros
@[else]@
# env variables in installspace
export ROS_ROOT=@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_SHARE_DESTINATION)
export ROS_ETC_DIR=@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_ETC_DESTINATION)
@[end if]@

View File

@ -1,10 +0,0 @@
cmake_minimum_required(VERSION 2.8.3)
project(ros)
find_package(catkin REQUIRED)
catkin_package()
if(CMAKE_HOST_UNIX)
catkin_add_env_hooks(10.ros SHELLS sh DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks)
else()
catkin_add_env_hooks(10.ros SHELLS bat DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks)
endif()

View File

@ -18,8 +18,6 @@
<author>Morgan Quigley</author>
<author>Rob Wheeler</author>
<build_depend>catkin</build_depend>
<run_depend>catkin</run_depend> <!-- only for backward compatibility with rosbuild -->
<run_depend>mk</run_depend>
<run_depend>rosbuild</run_depend>
@ -31,4 +29,8 @@
<run_depend>roscreate</run_depend>
<run_depend>rosmake</run_depend>
<run_depend>rosunit</run_depend>
<export>
<metapackage/>
</export>
</package>