package/lzo: fix CMake 4.0 compatibility

Add a patch to fix lzo builds with CMake 4.0.

Fixes:
 https://autobuild.buildroot.org/results/8d9/8d9cc53d68d93432e6a7bddad0ed3fdaed913da6 (target)
 https://autobuild.buildroot.org/results/aba/aba68e0889b66300f87706e15ff34899d3e1e97f (host)
 (and many more)

Signed-off-by: Florian Larysch <fl@n621.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Florian Larysch
2025-05-24 01:00:11 +02:00
committed by Julien Olivain
parent 6788f3d26c
commit 223abaf98a

View File

@@ -0,0 +1,48 @@
From 8158764baaa6cea81f514af157019c0dc81b6e46 Mon Sep 17 00:00:00 2001
From: Florian Larysch <fl@n621.de>
Date: Thu, 22 May 2025 23:46:42 +0200
Subject: [PATCH] cmake: bump compatibility level up to 3.10
As of CMake 4.0, backwards compatibility to versions older than 3.5 has
been removed and is deprecated for versions older than 3.10. Bump
compatibility to version 3.10 using the process described in [1].
Of the changed policies, only CMP0065 seems to affect the LZO build as
is, namely the example binaries, but this seems like a reasonable change
rather than an actual compatibility issue.
[1] https://cmake.org/cmake/help/v4.0/manual/cmake-policies.7.html#updating-projects
Upstream: Submitted to upstream via direct email as there is no public
mailing list or forge presence.
Signed-off-by: Florian Larysch <fl@n621.de>
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 98c0a1a..108537c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@
# All Rights Reserved.
#
-cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.0...3.10 FATAL_ERROR)
#
# simple usage example (Unix):
@@ -57,7 +57,7 @@ if(NOT ENABLE_STATIC AND NOT ENABLE_SHARED)
set(ENABLE_STATIC ON)
endif()
if(ENABLE_SHARED AND WIN32)
- cmake_minimum_required(VERSION 3.4.3 FATAL_ERROR) # needed for WINDOWS_EXPORT_ALL_SYMBOLS
+ cmake_minimum_required(VERSION 3.4.3...3.10 FATAL_ERROR) # needed for WINDOWS_EXPORT_ALL_SYMBOLS
endif()
# install directories
--
2.49.0