# The CPACK\_PACKAGE\_VERSION handling is confusing me?

**URL:** <https://discourse.cmake.org/t/the-cpack-package-version-handling-is-confusing-me/9735>\
**Category:** Code\
**Created:** [December 29, 2023, 4:36pm UTC](https://discourse.cmake.org/t/the-cpack-package-version-handling-is-confusing-me/9735 "2023-12-29T16:36:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)\
**Post date:** [December 29, 2023, 4:36pm UTC](https://discourse.cmake.org/t/the-cpack-package-version-handling-is-confusing-me/9735/1 "2023-12-29T16:36:27Z")

</div>

I use CPACK for my project:

**project(Boost-CMake LANGUAGES C CXX VERSION 1.81.0.3)**

The resulting TGZ package is named: **Boost-CMake-1.81.0-Darwin.tar.gz**

I am missing my last _RC_ number **v1.81.0-rc3**?

And if I use this **project(CPMExampleBoost)** the result is **CPMExampleBoost-0.1.1-Darwin.tar.bz2**  
or **CPMExampleBoost-1.84.0-Darwin.tar.gz** …

How is this CPACK\_PACKAGE\_VERSION calculated, I see random values if the `PROJECT_VERSION` is not defined?

```auto
build/CPackConfig.cmake:set(CPACK_PACKAGE_VERSION "0.1.1")

```

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [December 29, 2023, 7:11pm UTC](https://discourse.cmake.org/t/the-cpack-package-version-handling-is-confusing-me/9735/2 "2023-12-29T19:11:44Z")

</div>

AFAIK, CPack only models 3-component version numbers (e.g., the WiX generator’s backing tools only support 3 components and ranges on those values to boot due to registry representation limitations). You can craft the filename explicitly with `CPACK_PACKAGE_FILE_NAME`.
