def _get_output(package):
    values = OrderedDict()
    values['VERSION'] = '"%s"' % package.version

    values['MAINTAINER'] = '"%s"' % (', '.join([str(m) for m in package.maintainers]))

    values['PACKAGE_FORMAT'] = '"%d"' % package.package_format
    values.update(_get_dependency_values('BUILD_DEPENDS', package.build_depends))
    values.update(_get_dependency_values('BUILD_EXPORT_DEPENDS', package.build_export_depends))
    values.update(_get_dependency_values('BUILDTOOL_DEPENDS', package.buildtool_depends))
    values.update(_get_dependency_values('BUILDTOOL_EXPORT_DEPENDS', package.buildtool_export_depends))
    values.update(_get_dependency_values('EXEC_DEPENDS', package.exec_depends))
    # the run dependencies are a convenience property to mimick format one like dependencies
    # it contains the build export and exec_dependendcies
    values.update(_get_dependency_values('RUN_DEPENDS', package.run_depends))
    values.update(_get_dependency_values('TEST_DEPENDS', package.test_depends))
    values.update(_get_dependency_values('DOC_DEPENDS', package.doc_depends))

    deprecated = [e.content for e in package.exports if e.tagname == 'deprecated']
    values['DEPRECATED'] = '"%s"' % ((deprecated[0] if deprecated[0] else 'TRUE') if deprecated else '')

    output = []
    output.append(r'set(_CATKIN_CURRENT_PACKAGE "%s")' % package.name)
    for k, v in values.items():
        output.append('set(%s_%s %s)' % (package.name, k, v))
    return output
returns a list of strings with cmake commands to execute to set cmake variables
dataset/ETHPy150Open ros/catkin/cmake/parse_package_xml.py/_get_output