/usr/share/roslang/cmake/roslang.cmake is in roslang 1.14.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | # Figure out which languages we're building for. "rospack langs" will
# return a list of packages that:
# - depend directly on roslang
# - are not in the env var ROS_LANG_DISABLE
rosbuild_invoke_rospack("" _roslang LANGS langs)
separate_arguments(_roslang_LANGS)
# Iterate over the languages, retrieving any exported cmake fragment from
# each one.
set(_cmake_fragments)
foreach(_l ${_roslang_LANGS})
# Get the roslang attributes from this package.
# cmake
rosbuild_invoke_rospack(${_l} ${_l} CMAKE export --lang=roslang --attrib=cmake)
if(${_l}_CMAKE)
foreach(_f ${${_l}_CMAKE})
list(APPEND _cmake_fragments ${_f})
endforeach(_f)
endif(${_l}_CMAKE)
endforeach(_l)
# Hack to resolve languages from wet which rospack does not support yet
find_package(catkin QUIET 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)
set(_cmake_fragment ${${_l}_PACKAGE_PATH}/rosbuild/${_l}.cmake)
if(EXISTS ${_cmake_fragment})
list(APPEND _cmake_fragments ${_cmake_fragment})
endif()
endif(${_l}_PACKAGE_PATH)
endforeach(_l)
endif()
# Now include them all
foreach(_f ${_cmake_fragments})
if(NOT EXISTS ${_f})
message(FATAL_ERROR "Cannot include non-existent exported cmake file ${_f}")
endif(NOT EXISTS ${_f})
# Include this cmake fragment; presumably it will do /
# provide something useful. Only include each file once (a file
# might be multiply referenced because of package dependencies
# dependencies).
if(NOT ${_f}_INCLUDED)
message("[rosbuild] Including ${_f}")
include(${_f})
set(${_f}_INCLUDED Y)
endif(NOT ${_f}_INCLUDED)
endforeach(_f)
|