Skip to content

Commit

Permalink
[qtcreator] update env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Apr 26, 2024
1 parent eab2fed commit 299f42e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion qtcreator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ After installation the following still needs to be done to configure QtCreator w
1. Open QtCreator
2. Open Tools -> Options
3. Select the 'Build & Run' page on the left.
- In the 'General' tab change projects directory to `%{Env:TUE_SYSTEM_DIR}/src`
- In the 'General' tab change projects directory to `%{Env:TUE_ENV_WS_DIR}/src`
- In 'Default Build Properties' tab change 'Default build directory' to `%{Env:CURRENT_CMAKE_BUILD_DIR}/%{Project:Name}`

This matches the instructions from the [ROS Wiki](http://wiki.ros.org/IDEs#QtCreator)
7 changes: 4 additions & 3 deletions qtcreator/setup
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ function qtcreator
/opt/Qt/Tools/QtCreator/bin/qtcreator.sh
}

if [[ "${TUE_ROS_VERSION}" -eq 1 ]]
[[ -v TUE_ENV_ROS_VERSION || -v TUE_ROS_VERSION ]] || { TUE_ENV_ROS_VERSION=${TUE_ROS_VERSION}; >&2 echo "Change the config of your environment to use 'TUE_ENV_ROS_VERSION' instead of 'TUE_ROS_VERSION'"; }
if [[ "${TUE_ENV_ROS_VERSION}" -eq 1 ]]
then
# Make sure packages can be build by QT
CURRENT_CMAKE_BUILD_DIR=$(catkin locate --workspace "${TUE_SYSTEM_DIR}" --build 2>/dev/null)
CURRENT_CMAKE_BUILD_DIR=$(catkin locate --workspace "${TUE_ENV_WS_DIR}" --build 2>/dev/null)
else
CURRENT_CMAKE_BUILD_DIR="${TUE_SYSTEM_DIR}"/build
CURRENT_CMAKE_BUILD_DIR="${TUE_ENV_WS_DIR}"/build
fi

export CURRENT_CMAKE_BUILD_DIR

0 comments on commit 299f42e

Please sign in to comment.