make finding genmsg for roslang optional

This commit is contained in:
Dirk Thomas 2012-10-06 08:14:36 +00:00
parent ffb4fe6e92
commit 707e20c29c
1 changed files with 13 additions and 11 deletions

View File

@ -21,8 +21,9 @@ foreach(_l ${_roslang_LANGS})
endforeach(_l)
# Hack to resolve languages from wet which rospack does not support yet
find_package(catkin REQUIRED COMPONENTS genmsg)
foreach(_l ${CATKIN_MESSAGE_GENERATORS})
find_package(catkin COMPONENTS genmsg)
if(genmsg_FOUND)
foreach(_l ${CATKIN_MESSAGE_GENERATORS})
string(REPLACE "gen" "ros" _l ${_l})
rosbuild_find_ros_package(${_l})
if(${_l}_PACKAGE_PATH)
@ -31,7 +32,8 @@ foreach(_l ${CATKIN_MESSAGE_GENERATORS})
list(APPEND _cmake_fragments ${_cmake_fragment})
endif()
endif(${_l}_PACKAGE_PATH)
endforeach(_l)
endforeach(_l)
endif()
# Now include them all
foreach(_f ${_cmake_fragments})