The meson builtin object now has a project_license() method that returns a list of all licenses for the project.
meson
project_license()