Skip to content

(cmake): improve package version number generation

What does this MR do?

  • Added cmake helper script get_git_rev.cmake (from sight-deps) to find git tags, branch name, version...
  • Updated cmake script to generate a SDK filename using the latest tag (or git revision, see command git describe --tags)
  • Updated cmake script to add Sight version in app packages

How to test it?

before launching a ninja install, check that your install directory is empty

SDK

  • configure sight with BUILD_SDK to ON
  • and finally run:
> ninja install
> ninja package

Application

  • configure sight with BUILD_SDK to OFF
  • specify PROJECTS_TO_BUILD with an installable application (VRRender for example)
  • and finally run:
> ninja install
> ninja package

Data

No required data

Some results

SDK

  • A SDK archive file (tar.gz) is generated in build dir
  • Example in debug on windows, when you are not on a tag:
sight-Debug-18.1.0-xxx-gxxxxx-win64.tar.gz generated
  • Example in debug on windows on a tag:
sight-Debug-18.1.0-win64.tar.gz generated

Application

  • A archive file is generated in build dir
  • Example in debug on windows, when you are not on a tag:
VRRender-0.9-win64-Sight_18.1.0-437-g89507d1af.exe generated
  • Example in debug on windows on a tag:
VRRender-0.9-win64-Sight_18.1.0.exe generated

Additional tests to run

  • Generate on Windows
  • Generate on Linux
  • Generate on macOS

Associated issue

Edited by Luis MENDOZA

Merge request reports