From fea7800935da29821e7874bce2a89d83a1a878b5 Mon Sep 17 00:00:00 2001 From: Alper Ak Date: Wed, 9 Jul 2025 20:30:49 +0300 Subject: dlt-daemon: Add patch for CMake 4+ compatibility Fix: | CMake Error at CMakeLists.txt:17 (cmake_minimum_required): | Compatibility with CMake < 3.5 has been removed from CMake. | | Update the VERSION argument value. Or, use the ... syntax | to tell CMake that the project requires at least but has been updated | to work with policies introduced by or earlier. | | Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. | | | -- Configuring incomplete, errors occurred! Signed-off-by: Alper Ak Signed-off-by: Khem Raj --- .../dlt-daemon/0003-allow-build-with-cmake-4.patch | 99 ++++++++++++++++++++++ .../dlt-daemon/dlt-daemon_2.18.10.bb | 1 + 2 files changed, 100 insertions(+) create mode 100644 meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0003-allow-build-with-cmake-4.patch diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0003-allow-build-with-cmake-4.patch b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0003-allow-build-with-cmake-4.patch new file mode 100644 index 0000000000..ac5fec5684 --- /dev/null +++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0003-allow-build-with-cmake-4.patch @@ -0,0 +1,99 @@ +From ae23f2cccc169874d89903cad24bf36e19bef659 Mon Sep 17 00:00:00 2001 +From: Alper Ak +Date: Wed, 9 Jul 2025 18:18:33 +0300 +Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+ + compatibility + +Fix: + +| CMake Error at CMakeLists.txt:17 (cmake_minimum_required): +| Compatibility with CMake < 3.5 has been removed from CMake. +| +| Update the VERSION argument value. Or, use the ... syntax +| to tell CMake that the project requires at least but has been updated +| to work with policies introduced by or earlier. +| +| Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. +| +| +| -- Configuring incomplete, errors occurred! + +Upstream-Status: Submitted [https://github.com/COVESA/dlt-daemon/pull/755] + +Signed-off-by: Alper Ak +--- + CMakeLists.txt | 2 +- + examples/example1/CMakeLists.txt | 2 +- + examples/example2/CMakeLists.txt | 2 +- + examples/example3/CMakeLists.txt | 2 +- + examples/example4/CMakeLists.txt | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 94185b8..2a0f619 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,7 +14,7 @@ + ####### + + # Set minimum Cmake version and setup policy behavior +-cmake_minimum_required(VERSION 3.3) ++cmake_minimum_required(VERSION 3.5) + + if(${CMAKE_VERSION} VERSION_GREATER "3.20" OR ${CMAKE_VERSION} VERSION_EQUAL "3.20") + cmake_policy(SET CMP0115 OLD) +diff --git a/examples/example1/CMakeLists.txt b/examples/example1/CMakeLists.txt +index 60644a1..44cd053 100644 +--- a/examples/example1/CMakeLists.txt ++++ b/examples/example1/CMakeLists.txt +@@ -17,7 +17,7 @@ + # DLT example implementation + # + +-cmake_minimum_required( VERSION 2.6 ) ++cmake_minimum_required( VERSION 3.5 ) + project( automotive-dlt-example1 ) + + # +diff --git a/examples/example2/CMakeLists.txt b/examples/example2/CMakeLists.txt +index 66a4f24..a8efbcf 100644 +--- a/examples/example2/CMakeLists.txt ++++ b/examples/example2/CMakeLists.txt +@@ -17,7 +17,7 @@ + # DLT example implementation + # + +-cmake_minimum_required( VERSION 2.6 ) ++cmake_minimum_required( VERSION 3.5 ) + project( automotive-dlt-example2 ) + + # +diff --git a/examples/example3/CMakeLists.txt b/examples/example3/CMakeLists.txt +index 45b7467..4d4958d 100644 +--- a/examples/example3/CMakeLists.txt ++++ b/examples/example3/CMakeLists.txt +@@ -17,7 +17,7 @@ + # DLT example implementation + # + +-cmake_minimum_required( VERSION 2.6 ) ++cmake_minimum_required( VERSION 3.5 ) + project( automotive-dlt-example3 ) + + # +diff --git a/examples/example4/CMakeLists.txt b/examples/example4/CMakeLists.txt +index 53a4fad..161c333 100644 +--- a/examples/example4/CMakeLists.txt ++++ b/examples/example4/CMakeLists.txt +@@ -17,7 +17,7 @@ + # DLT example implementation + # + +-cmake_minimum_required( VERSION 2.6 ) ++cmake_minimum_required( VERSION 3.5 ) + project( automotive-dlt-example4 ) + + # +-- +2.43.0 + diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb index 8b48d20aac..82edde6c9d 100644 --- a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb +++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb @@ -20,6 +20,7 @@ SRC_URI = "git://github.com/COVESA/${BPN}.git;protocol=https;branch=master \ file://544.patch \ file://567.patch \ file://0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch \ + file://0003-allow-build-with-cmake-4.patch \ " SRCREV = "0f2d4cfffada6f8448a2cb27995b38eb4271044f" -- cgit v1.2.3-54-g00ecf