diff --git a/hrpsys_ros_bridge/cmake/compile_robot_model.cmake b/hrpsys_ros_bridge/cmake/compile_robot_model.cmake index 07a92a57e..51c97c19a 100644 --- a/hrpsys_ros_bridge/cmake/compile_robot_model.cmake +++ b/hrpsys_ros_bridge/cmake/compile_robot_model.cmake @@ -316,9 +316,14 @@ endmacro() # get path to collada_to_urdf macro(get_collada_to_urdf _collada_to_urdf_exe) + find_package(collada_urdf_jsk_patch QUIET) find_package(collada_urdf REQUIRED) - set(${_collada_to_urdf_exe} ${collada_urdf_PREFIX}/lib/collada_urdf/collada_to_urdf) - if(NOT EXISTS ${${_collada_to_urdf_exe}}) + if (collada_urdf_jsk_patch_FOUND) + set(${_collada_to_urdf_exe} ${collada_urdf_jsk_patch_PREFIX}/lib/collada_urdf_jsk_patch/collada_to_urdf) + elseif (collada_urdf_FOUND) + set(${_collada_to_urdf_exe} ${collada_urdf_PREFIX}/lib/collada_urdf/collada_to_urdf) + endif (collada_urdf_jsk_patch_FOUND) + if(NOT EXISTS "${${_collada_to_urdf_exe}}") message(FATAL_ERROR "could not find ${${_collada_to_urdf_exe}}") endif() endmacro(get_collada_to_urdf _collada_to_urdf_exe)