-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
env-hooks: install env-hook to etc/orocos/OROCOS_TARGET/profile.d
The env-hook sets the OROCOS_TARGET environment variable if not set and adds the lib/orocos directory of the install-space and all entries of the CMAKE_PREFIX_PATH (for catkin workspaces) to the RTT_COMPONENT_PATH. The scripts in etc/orocos/OROCOS_TARGET/profile.de will be sourced in lexical order by a new setup.sh script located in the orocos_toolchain repository. Signed-off-by: Johannes Meyer <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,16 @@ | ||
#!/bin/sh | ||
export OROCOS_TARGET=@OROCOS_TARGET@ | ||
export RTT_COMPONENT_PATH=`echo $CMAKE_PREFIX_PATH | sed 's!:!/lib/orocos:!g' | sed 's!$!/lib/orocos!'` | ||
|
||
: ${OROCOS_TARGET:=@OROCOS_TARGET@} | ||
|
||
for path in `echo $CMAKE_PREFIX_PATH | tr : ' '` "@CMAKE_INSTALL_PREFIX@"; do | ||
if [ ! -d "$path/lib/orocos" ]; then | ||
continue | ||
elif [ -z "$RTT_COMPONENT_PATH" ]; then | ||
RTT_COMPONENT_PATH="$path/lib/orocos" | ||
elif ! echo "$RTT_COMPONENT_PATH" | grep -q "$path/lib/orocos"; then | ||
RTT_COMPONENT_PATH="$RTT_COMPONENT_PATH:$path/lib/orocos" | ||
fi | ||
done | ||
|
||
export OROCOS_TARGET | ||
export RTT_COMPONENT_PATH |