# project version vs target version

**URL:** https://discourse.cmake.org/t/project-version-vs-target-version/11576
**Category:** Usage
**Created:** [September 3, 2024, 1:31pm UTC](https://discourse.cmake.org/t/project-version-vs-target-version/11576 "2024-09-03T13:31:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![adaldev](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@adaldev](https://discourse.cmake.org/u/adaldev)
#### Post date: [September 3, 2024, 1:31pm UTC](https://discourse.cmake.org/t/project-version-vs-target-version/11576/1 "2024-09-03T13:31:12Z")

</div>

Hi,

So far I overlooked version configuration files in my installation procedure. Wanting to add that, I realize that `write_basic_package_version_file` is taking the target version but the `project` has also a `VERSION` option. My first thought was that `write_basic_package_version_file` should use the `project` option (to avoid inconsistency for instance) but a bit of reading on the net tends to say that both version numbers don’t have the same purpose and meaning. Yet the documentation of the `project` command tells how to set a version but not what to use it for.

Is there a (semantic) difference between these 2 versions? How should they be used?

Besides, `write_basic_package_version_file` seems to be only related to `find_package`. If I want my artefact (binary file) to actually have a version property how should I do? Is a `set_target_properties(`${TargetName} PROPERTIES VERSION “x.y.z”`) required? (it seems that there is also SOVERSION to add confusion on my confusion…).

Regards  
A.
