[Buildroot] [PATCH v1 1/1] package/pkg-cmake.mk: force config version >=3.5
Christian Stewart
christian at aperture.us
Fri Apr 4 18:24:07 UTC 2025
Some packages have CMakeLists.txt requiring CMake <3.5.
Newer CMake forces at minimum version 3.5, leading to build failures:
https://github.com/skiffos/SkiffOS/actions/runs/14208988354/job/39812576139#step:8:638
https://github.com/skiffos/SkiffOS/actions/runs/14211566256/job/39819600184#step:8:26664
Add the suggested build flag to force version 3.5.x and fix the error:
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
This is applied to all cmake packages to force 3.5 as a minimum.
Signed-off-by: Christian Stewart <christian at aperture.us>
---
package/pkg-cmake.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index c7032312fb..7bff3851cf 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -53,6 +53,10 @@ define inner-cmake-package
$(3)_SUPPORTS_IN_SOURCE_BUILD ?= YES
+# Some packages requires CMake 3.0.0 but latest CMake requires >=3.5
+# Set the policy version minimum to force these packages to 3.5 or greater.
+$(2)_CONF_OPTS += -DCMAKE_POLICY_VERSION_MINIMUM=3.5
+
# The default backend, unless specified by the package
$(3)_CMAKE_BACKEND ?= make
--
2.39.5
More information about the buildroot
mailing list