From 574aae2146636d6f7dc7d54e845a5a97f14418a5 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 29 Oct 2025 12:26:53 +0100 Subject: [PATCH] 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 (7ba04a298cc648255b820d9b5ad184528a6ea5ca). However, since then, we changed the format of the product version definition (879cba1a67d01317422870ff736057ca2d23247f), 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 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 659fd50885..728adc8bbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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"