From ae23f2cccc169874d89903cad24bf36e19bef659 Mon Sep 17 00:00:00 2001
From: Alper Ak <alperyasinak1@gmail.com>
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 <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: Submitted [https://github.com/COVESA/dlt-daemon/pull/755]

Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
---
 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

