[ros-users] [Discourse.ros.org] [Next Generation ROS] Make A…

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: Dirk Thomas via ros-users
Dato:  
Til: ros-users
Emne: [ros-users] [Discourse.ros.org] [Next Generation ROS] Make Ament work with another build system (for cross-compilation)


`ament_package()` internally calls `ament_package_xml()` which is responsible to parse the `package.xml` file and defined CMake variables for various parts. You can either access the variables after the `ament_package()` call or manually invoke `ament_package_xml()` anytime before to get the information earlier.

The [package_xml_2_cmake.py](https://github.com/ament/ament_cmake/blob/master/ament_cmake_core/cmake/core/package_xml_2_cmake.py) script is responsible to extract the majority of the information. You can also look at the generated CMake code for a specific folder - in each package build folder you find a file name `ament_cmake_core/package.cmake`. It contains all the CMake variables defined for the package, e.g. variable for the package name, version, maintainer, all the dependency types, version, export tags, etc.

As an example the generated `package.cmake` file for the `ament_index_cpp` package looks like this:

```
set(_AMENT_PACKAGE_NAME "ament_index_cpp")
set(ament_index_cpp_VERSION "0.0.2")
set(ament_index_cpp_MAINTAINER "Dirk Thomas <>")
set(ament_index_cpp_BUILD_DEPENDS )
set(ament_index_cpp_BUILDTOOL_DEPENDS "ament_cmake")
set(ament_index_cpp_BUILD_EXPORT_DEPENDS )
set(ament_index_cpp_BUILDTOOL_EXPORT_DEPENDS )
set(ament_index_cpp_EXEC_DEPENDS )
set(ament_index_cpp_TEST_DEPENDS "ament_cmake_gtest" "ament_lint_auto" "ament_lint_common")
set(ament_index_cpp_DEPRECATED "")
set(ament_index_cpp_EXPORT_TAGS)
list(APPEND ament_index_cpp_EXPORT_TAGS "<build_type>ament_cmake</build_type>")
```





---
[Visit Topic](https://discourse.ros.org/t/make-ament-work-with-another-build-system-for-cross-compilation/2382/8) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list

http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>