How to get a project's version from meson.build file? #10154
-
I have this project's meson.build file and I would like to obtain it's version in programmatic way. Talking about shell scripting, I could do Is there a more Meson-way for me to extract this version from meson.build? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
The JSON introspection data has this information, but only once you generate the builddir. The |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
IMHO it would make sense to add a subcommand to meson introspect that just parse the initial project() arguments. |
Beta Was this translation helpful? Give feedback.
meson introspect meson.build --projectinfo
gives you a json that contains to version. Maybe we should actually document that feature.