diff mbox series

[meta-openembedded,5/9] cdrkit: Add patch for CMake 4+ compatibility

Message ID 20250707225407.1558421-5-alperyasinak1@gmail.com
State New
Headers show
Series [meta-openembedded,1/9] liblightmodbus: Upgrade 2.0.2 -> 3.0 to allow CMake 4+ compatibility | expand

Commit Message

Alper Ak July 7, 2025, 10:54 p.m. UTC
Fix:

| CMake Error in CMakeLists.txt:
|   No cmake_minimum_required command is present.  A line of code such as
|
|     cmake_minimum_required(VERSION 4.0)
|
|   should be added at the top of the file.  The version specified may be lower
|   if you wish to support older CMake versions for this project.  For more
|   information run "cmake --help-policy CMP0000".
|
|
| -- Configuring incomplete, errors occurred!

Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
---
 .../cdrkit/cdrkit_1.1.11.bb                   |  1 +
 .../files/0003-allow-build-with-cmake-4.patch | 37 +++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 meta-oe/recipes-multimedia/cdrkit/files/0003-allow-build-with-cmake-4.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb b/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb
index 4b57957cfc..16b15f745e 100644
--- a/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb
+++ b/meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb
@@ -14,6 +14,7 @@  SRC_URI = "${DEBIAN_MIRROR}/main/c/${BPN}/${BPN}_${PV}.orig.tar.gz \
            file://0001-add-new-option-eltorito-platform.patch \
            file://0001-genisoimage-Add-checksum.h-and-md5.h-for-function-pr.patch \
            file://fix-incompatible-pointer-type-error.patch \
+           file://0003-allow-build-with-cmake-4.patch \
            "
 SRC_URI:append:class-nativesdk = " \
            file://0001-install-netscsid-to-bin-for-nativesdk.patch \
diff --git a/meta-oe/recipes-multimedia/cdrkit/files/0003-allow-build-with-cmake-4.patch b/meta-oe/recipes-multimedia/cdrkit/files/0003-allow-build-with-cmake-4.patch
new file mode 100644
index 0000000000..bcab44a5a4
--- /dev/null
+++ b/meta-oe/recipes-multimedia/cdrkit/files/0003-allow-build-with-cmake-4.patch
@@ -0,0 +1,37 @@ 
+From 4ce4c135f83f9d7894ccbb0901391f5cbf2b1935 Mon Sep 17 00:00:00 2001
+From: Alper Ak <alperyasinak1@gmail.com>
+Date: Mon, 7 Jul 2025 21:34:32 +0300
+Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
+ compatibility
+
+| CMake Error in CMakeLists.txt:
+|   No cmake_minimum_required command is present.  A line of code such as
+|
+|     cmake_minimum_required(VERSION 4.0)
+|
+|   should be added at the top of the file.  The version specified may be lower
+|   if you wish to support older CMake versions for this project.  For more
+|   information run "cmake --help-policy CMP0000".
+|
+|
+| -- Configuring incomplete, errors occurred!
+
+Upstream-Status: Pending
+
+Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 57edba6..bdfb8bb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,3 +1,4 @@
++cmake_minimum_required(VERSION 3.5)
+ PROJECT (cdrkit C)
+ SUBDIRS(include genisoimage wodim libedc libhfs_iso libparanoia icedax libusal librols libunls readom netscsid 3rd-party/dirsplit)
+ 
+-- 
+2.43.0
+