fix(build): project version variable is ignored in XML
Description
We provide a PROJECT_VERSION
variable in CMake that can be used in plugin.xml
, for instance, to set the application frame title name. It does not work as expected and is insufficient when we want to specify an application-specific version number.
Steps to reproduce
- Launch SightCalibrator
- Observe the application frame title does not mention the current Sight version
Functional specifications
- First, we need to fix the interpretation of the
PROJECT_VERSION
variable. Use it in some samples. - Secondly, propose a mechanism to define a variable
<target>_VERSION
for each application, that matches the version used in the packaging, deduced from git tags. Use it in SightViewer and SightCalibrator.
Technical specifications
- Define the variable
PROJECT_VERSION
when configuring the target resources. - Define a new variable
${SIGHT_TARGET}_VERSION
when configuring the target resources. This variable will be populated using thegit_get_last_tag
function. It can be then used, or not, in any XML file.
Test plan
- Launch the modified samples and observe the title mentions a version number corresponding to the current sight version.
- Launch SightViewer and SightCalibrator and observe the title mentions a version number corresponding to the git tag.