package/libubootenv: fix cmake 4 compatibility
PATCH v2 1/1 package/libubootenv: fix cmake 4 compatibility
Add a patch fixing cmake 4 compatibility.
Signed-off-by James Hilliard <[email protected]>
---
Changes v1 -> v2:
- also fix src/CMakeLists.txt
--- ...Update-cmake_minimum_required-to-3.5.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 package/libubootenv/0002-Update-cmake_minimum_required-to-3.5.patch
package/libubootenv/0002-Update-cmake_minimum_required-to-3.5.patch new file +53 -0
@@ -0,0 +1,53 @@ +From 87581f45d442903af8a9f331b11052bdd836c7f6 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Wed, 14 May 2025 14:03:38 -0600 +Subject: [PATCH] Update cmake_minimum_required to 3.5 + +This supports compilation with cmake-4.0.0. + +Fixes: +CMake Error at CMakeLists.txt:5 (cmake_minimum_required): + Compatibility with CMake < 3.5 has been removed from CMake. + + Update the VERSION argument <min> value. Or, use the <min>...<max> syntax + to tell CMake that the project requires at least <min> but has been updated + to work with policies introduced by <max> or earlier. + + Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. + +Signed-off-by: James Hilliard <[email protected]> +Upstream: https://patchwork.ozlabs.org/project/swupdate/patch/[email protected]/ +--- + CMakeLists.txt | 2 +- + src/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 796d7bc..0a11730 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,7 +2,7 @@ + # + # SPDX-License-Identifier: LGPL-2.1-or-later + +-cmake_minimum_required (VERSION 2.6) ++cmake_minimum_required (VERSION 3.5) + project (libubootenv C) + + # The version number. +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index c56d0c7..3370232 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,7 +1,7 @@ + # SPDX-FileCopyrightText: 2019-2021 Stefano Babic <[email protected]> + # + # SPDX-License-Identifier: LGPL-2.1-or-later +-cmake_minimum_required (VERSION 2.6) ++cmake_minimum_required (VERSION 3.5) + # Sources and private headers + SET(libubootenv_SOURCES + uboot_env.c +-- +2.34.1 +
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 3 lines · James Hilliard
Add a patch fixing cmake 4 compatibility.
Signed-off-by James Hilliard <[email protected]>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot