Skip to content

CMake config file contains only 'major.minor.patch' version #466

@lukaszstolarczuk

Description

@lukaszstolarczuk

When executing make install we prepare (and install) a special config file, to be used via CMake's find_package in other projects. It currently uses a CMake's helper function: write_basic_package_version_file <docs>. This helper function uses a template, which uses VERSION in format <major.minor.patch> - it does not use any tweak or pre-release version part. So it's always uses the same version, even though we e.g. moved on from "0.1.0" version by many commits on the main branch.

That said - it seems it will be a little difficult to find out the real version of e.g. a customer's version installed in the system.

Perhaps, one solution would be to write our own config version script...?

FYI, the config file mentioned above is currently installed like here: install-dir/lib/cmake/umf/umf-config-version.cmake, and starts like this:

set(PACKAGE_VERSION "0.1.0")

if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
...

Along with that, we should probably add info in README file, how to integrate our project via CMake (or propose other integration ways).

This issue is slightly related to #453.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions