Skip to content

Commit

Permalink
Merge pull request #268 from ros/relocatable
Browse files Browse the repository at this point in the history
resolve roslaunch/rostest paths in installspace at runtime without find_program() (ros/catkin#490)
  • Loading branch information
dirk-thomas committed Aug 3, 2013
2 parents f505cb0 + e0366e1 commit 856f71a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions tools/roslaunch/cmake/roslaunch-extras.cmake.em
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# generated from ros_comm/tools/roslaunch/cmake/roslaunch-extras.cmake.em

@[if DEVELSPACE]@
# set path to roslaunch-check.py in develspace
# set path to roslaunch-check script in develspace
set(roslaunch_check_script @(CMAKE_CURRENT_SOURCE_DIR)/scripts/roslaunch-check)
@[else]@
# set path to roslaunch-check.py installspace
set(roslaunch_check_script @(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_SHARE_DESTINATION)/scripts/roslaunch-check)
# set path to roslaunch-check script installspace
set(roslaunch_check_script ${roslaunch_DIR}/../scripts/roslaunch-check)
@[end if]@

#
Expand Down
12 changes: 4 additions & 8 deletions tools/rostest/cmake/rostest-extras.cmake.em
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ function(add_rostest file)
_warn_if_skip_testing("add_rostest")

@[if DEVELSPACE]@
# find program in develspace
find_program_required(ROSTEST_EXE rostest
PATHS @(PROJECT_SOURCE_DIR)/scripts
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# bin in develspace
set(ROSTEST_EXE "@(PROJECT_SOURCE_DIR)/scripts/rostest")
@[else]@
# find program in installspace
find_program_required(ROSTEST_EXE rostest
PATHS @(CMAKE_INSTALL_PREFIX)/bin
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# bin in installspace
set(ROSTEST_EXE "${rostest_DIR}/../../../@(CATKIN_GLOBAL_BIN_DESTINATION)/rostest")
@[end if]@

cmake_parse_arguments(_rostest "" "WORKING_DIRECTORY" "ARGS" ${ARGN})
Expand Down

0 comments on commit 856f71a

Please sign in to comment.