Fix duplication of product version in CMakeLists.txt

The CMake package version definition had its own line with a copy of the
version number since 2.27.0. Until recently, `bump_version.sh` updated both
copies, and that was still the case when we bumped the version to 4.0.0
(7ba04a298c). However, since then, we changed
the format of the product version definition
(879cba1a67), and after that,
`bump_version.sh` would only have updated the product version, not the CMake
package version.

TF-PSA-Crypto 1.0.0 has the same problem, and there we did ship with an
outdated CMake package version:
https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/553

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2025-10-29 12:26:53 +01:00
parent b180696e94
commit 574aae2146

View File

@@ -522,7 +522,7 @@ if(NOT DISABLE_PACKAGE_CONFIG_AND_INSTALL)
write_basic_package_version_file(
"cmake/MbedTLSConfigVersion.cmake"
COMPATIBILITY SameMajorVersion
VERSION 4.0.0)
VERSION "${MBEDTLS_VERSION}")
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/MbedTLSConfig.cmake"