Skip to content

Commit

Permalink
Merge pull request start-jsk#86 from k-okada/do_not_copmile_hrp2_cont…
Browse files Browse the repository at this point in the history
…roller_on_non_robot_machine

[jsk_hrp2_ros_bridge/catkin.cmake] if hrpsys is installed via deb, we do...
  • Loading branch information
k-okada committed Apr 2, 2015
2 parents bf0dac9 + f6224c3 commit 42efe11
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions jsk_hrp2_ros_bridge/catkin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ if(EXISTS ${openrtm_ros_bridge_SOURCE_PREFIX}/../hrpsys)
set(hrpsys_SOURCE_DIR ${openrtm_ros_bridge_SOURCE_PREFIX}/../hrpsys)
elseif(hrpsys_SOURCE_PREFIX AND EXISTS ${hrpsys_SOURCE_PREFIX})
set(hrpsys_SOURCE_DIR ${hrpsys_SOURCE_PREFIX})
elseif(hrpsys_PREFIX AND EXISTS ${hrpsys_PREFIX})
set(hrpsys_SOURCE_DIR ${hrpsys_PREFIX}/share/hrpsys/src/)
else(EXISTS ${openrtm_ros_bridge_SOURCE_PREFIX}/../hrpsys)
# Assuming that hrpsys source is available on somewhere workspace.
# Checking all the workspaces if it does have hrpsys directory on the
Expand All @@ -46,7 +48,11 @@ if(NOT jsk_hrp2_ros_bridge_FOUND)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/installed)
endif()

if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/installed)
if(NOT EXISTS ${hrpsys_SOURCE_DIR}/CMakeLists.txt)
message(WARNING "### ${hrpsys_SOURCE_DIR}/CMakeLists.txt does not exists so we do not compile HRP3Hand Controller")
message(WARNING "### so if you want to use them please install hrpsys from source code")
endif()
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/installed AND EXISTS ${hrpsys_SOURCE_DIR}/CMakeLists.txt)
set(ENV{PATH} ${openrtm_aist_PREFIX}/lib/openrtm_aist/bin/:$ENV{PATH}) #update PATH for rtm-config
if (NOT EXISTS ${PROJECT_SOURCE_DIR}/patch)
execute_process(COMMAND ln -sf ${hrpsys_SOURCE_DIR}/patch ${PROJECT_SOURCE_DIR}/patch)
Expand All @@ -67,7 +73,7 @@ if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/installed)
if (_make_failed)
message(FATAL_ERROR "Compile hrpsys failed")
endif(_make_failed)
endif(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/installed)
endif(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/installed AND EXISTS ${hrpsys_SOURCE_DIR}/CMakeLists.txt)

# include rtmbuild
if(EXISTS ${rtmbuild_SOURCE_DIR}/cmake/rtmbuild.cmake)
Expand Down

0 comments on commit 42efe11

Please sign in to comment.