diff mbox series

[meta-openembedded,03/20] ade: Add patch for CMake 4+ compatibility

Message ID 20250709173054.605430-3-alperyasinak1@gmail.com
State Under Review
Headers show
Series [meta-openembedded,01/20] librdkafka: Upgrade 1.8.2 -> 2.11.0 to allow CMake 4+ compatibility | expand

Commit Message

Alper Ak July 9, 2025, 5:30 p.m. UTC
Fix:

| CMake Error at CMakeLists.txt:7 (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.
|
|
| -- Configuring incomplete, errors occurred!

Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
---
 .../ade/0001-allow-build-with-cmake-4.patch   | 43 +++++++++++++++++++
 meta-oe/recipes-support/opencv/ade_0.1.2.bb   |  4 +-
 2 files changed, 45 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-support/opencv/ade/0001-allow-build-with-cmake-4.patch

Comments

Gyorgy Sarvari July 9, 2025, 6:44 p.m. UTC | #1
On 7/9/25 19:30, Alper Ak via lists.openembedded.org wrote:
> +
> +Upstream-Status: Backport [https://github.com/opencv/ade/commit/8b24d5f1286d178fd0d3a22d584e1a798f5e9a6c]
> +
>
There are multiple new tags that contain this commit (v0.1.2c ...
v0.1.2e), unless we need this specific old tag, I think a tag bump would
be better over having a patch.
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/opencv/ade/0001-allow-build-with-cmake-4.patch b/meta-oe/recipes-support/opencv/ade/0001-allow-build-with-cmake-4.patch
new file mode 100644
index 0000000000..6deabea160
--- /dev/null
+++ b/meta-oe/recipes-support/opencv/ade/0001-allow-build-with-cmake-4.patch
@@ -0,0 +1,43 @@ 
+From 342406450ebd9fbc68a3c3022b2c91c6e0c3de03 Mon Sep 17 00:00:00 2001
+From: Alper Ak <alperyasinak1@gmail.com>
+Date: Wed, 9 Jul 2025 11:00:41 +0300
+Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
+ compatibility
+
+Fix:
+
+| CMake Error at CMakeLists.txt:7 (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.
+|
+|
+| -- Configuring incomplete, errors occurred!
+
+Upstream-Status: Backport [https://github.com/opencv/ade/commit/8b24d5f1286d178fd0d3a22d584e1a798f5e9a6c]
+
+Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index af78061..45dfb09 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -4,7 +4,7 @@
+ # SPDX-License-Identifier: Apache-2.0
+ #
+ 
+-cmake_minimum_required(VERSION 3.2)
++cmake_minimum_required(VERSION 3.5)
+ 
+ project(ade)
+ 
+-- 
+2.43.0
+
diff --git a/meta-oe/recipes-support/opencv/ade_0.1.2.bb b/meta-oe/recipes-support/opencv/ade_0.1.2.bb
index b54c28d624..6a0559a577 100644
--- a/meta-oe/recipes-support/opencv/ade_0.1.2.bb
+++ b/meta-oe/recipes-support/opencv/ade_0.1.2.bb
@@ -4,7 +4,8 @@  and processing framework. ADE Framework is suitable for \
 organizing data flow processing and execution."
 HOMEPAGE = "https://github.com/opencv/ade"
 
-SRC_URI = "git://github.com/opencv/ade.git;branch=master;protocol=https"
+SRC_URI = "git://github.com/opencv/ade.git;branch=master;protocol=https \
+        file://0001-allow-build-with-cmake-4.patch"
 
 SRCREV = "1e02d7486bdb9c87993d91b9910e7cc6c4ddbf66"
 
@@ -13,7 +14,6 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
 inherit cmake
 
-
 EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release"
 
 FILES:${PN}-dev += "${datadir}/${BPN}/*.cmake"