daniele77 / cli

A library for interactive command line interfaces in modern C++
Boost Software License 1.0
1.23k stars 140 forks source link

find_package(cli) doesn't define cli_VERSION #192

Closed yurivict closed 9 months ago

yurivict commented 1 year ago

Most cmake-based packages do define {name}_VERSION.

daniele77 commented 1 year ago

Right. Could you provide a PR for that?

daniele77 commented 9 months ago

@yurivict cli library already define cli_VERSION variable and you can read it when find_package is used (i.e., with conan package manager). On the other hand, cmake does not allow a project to read variables defined in libraries added using add_subdirectory, so in that case unfortunately you cannot have that information.