Example of using ament_export_definitions() from ament_cmake_export_definitions
- Dominant language
- CMake
- Stars
- 125
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I'm trying to create a meta package for ament to build the same packages with different preprocessor definitions for different code functionalities.
Is there any example of using this and gathering the definition in the downstream package.
While this is not an issue, I am struggling to find example usage between an upstream and downstram package. I thought since this is a newish module that it would be best to go here.
For example:
In metapackage1/CMakeLists.txt I have:
```
ament_export_defintiion(PLAT1=1)``
ament_package()
```
In downstream package/CMakeLists.txt, I have
```
if(${PLAT1})
message('got definition")
endif()
```
But I don't get any indication that the variable was defiined. Am I using this wrong? I would really appreciate an example if possible. Thanks so much!
Contributor guide
Assessment
This issue has not been assessed yet.