gz-cmake
gz-cmake copied to clipboard
The doxygen configuration should include more file types that can be used by the `\snippet` command
Desired behavior
The EXAMPLE_PATTERN (https://github.com/gazebosim/gz-cmake/blob/200de1b26edbad9ad1d7efd7c29dd4f2080edefa/doc/doxygen/api.in#L904) in the doxygen configuration is limited to C++ and CMake files. It would be great if other types (eg. .proto, .py, .rb, .sdf, CMakeList.txt) were supported. This would allow us to use the \include or \snippet commands in our documentation instead of duplicating code from examples.
Is there something non-trivial to be done for this to work?
I tried adding *.sdf to EXAMPLE_PATTERNS and referenced a file with:
<!-- [render_engine_def] -->
<plugin
filename="gz-sim-sensors-system"
name="gz::sim::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
<!-- [render_engine_def] -->
But the snippet generated in docs is empty.