summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Haase <Moritz.Haase@bmw.de>2025-07-11 15:15:52 +0200
committerKhem Raj <raj.khem@gmail.com>2025-07-11 08:35:05 -0700
commitb7a6d63835b808b7ada92d59bd201b4e946d520a (patch)
tree404153e25c9017b09b823e4870456e1b29c47206
parent90e240756c159001b66580cadc1cef5380f81a1f (diff)
downloadmeta-openembedded-b7a6d63835b808b7ada92d59bd201b4e946d520a.tar.gz
jsonrpc: Allow to build with CMake 4+
Upstream is inactive, so use the 'minimum policy version' override. An additional patch is required to remove usage of an outdated policy that only affects MacOS however, so we should we fine. Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/jsonrpc/jsonrpc/0001-cmake-Remove-usage-of-obsolete-MacOS-only-policy.patch38
-rw-r--r--meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb5
2 files changed, 42 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/jsonrpc/jsonrpc/0001-cmake-Remove-usage-of-obsolete-MacOS-only-policy.patch b/meta-oe/recipes-devtools/jsonrpc/jsonrpc/0001-cmake-Remove-usage-of-obsolete-MacOS-only-policy.patch
new file mode 100644
index 0000000000..ef0c12722f
--- /dev/null
+++ b/meta-oe/recipes-devtools/jsonrpc/jsonrpc/0001-cmake-Remove-usage-of-obsolete-MacOS-only-policy.patch
@@ -0,0 +1,38 @@
1From 7cc415c5b2406b16adcccdce3fc8bf5223a1bdb1 Mon Sep 17 00:00:00 2001
2From: Moritz Haase <Moritz.Haase@bmw.de>
3Date: Fri, 11 Jul 2025 12:31:49 +0200
4Subject: [PATCH] cmake: Remove usage of obsolete MacOS-only policy
5
6Workaround an error reported by CMake 4 that only affects MacOS.
7
8CMake Error at CMakeLists.txt:21 (cmake_policy):
9 Policy CMP0042 may not be set to OLD behavior because this version of CMake
10 no longer supports it. The policy was introduced in CMake version 3.0.0,
11 and use of NEW behavior is now required.
12
13 Please either update your CMakeLists.txt files to conform to the new
14 behavior or use an older version of CMake that still supports the old
15 behavior. Run cmake --help-policy CMP0042 for more information.
16
17Upstream-Status: Inactive-Upstream [2022-01-12]
18Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
19---
20 CMakeLists.txt | 5 -----
21 1 file changed, 5 deletions(-)
22
23diff --git a/CMakeLists.txt b/CMakeLists.txt
24index 961e55a..909610b 100644
25--- a/CMakeLists.txt
26+++ b/CMakeLists.txt
27@@ -16,11 +16,6 @@ project(libjson-rpc-cpp)
28 cmake_policy(SET CMP0007 NEW)
29 cmake_policy(SET CMP0012 NEW)
30
31-if (${CMAKE_MAJOR_VERSION} GREATER 2)
32- # old policy do not use MACOSX_RPATH
33- cmake_policy(SET CMP0042 OLD)
34-endif()
35-
36 set(MAJOR_VERSION 1)
37 set(MINOR_VERSION 4)
38 set(PATCH_VERSION 1)
diff --git a/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb b/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb
index ae86e20a4a..18a8904015 100644
--- a/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb
+++ b/meta-oe/recipes-devtools/jsonrpc/jsonrpc_1.4.1.bb
@@ -9,7 +9,9 @@ SECTION = "libs"
9 9
10DEPENDS = "curl jsoncpp libmicrohttpd hiredis" 10DEPENDS = "curl jsoncpp libmicrohttpd hiredis"
11 11
12SRC_URI = "git://github.com/cinemast/libjson-rpc-cpp;branch=master;protocol=https" 12SRC_URI = "git://github.com/cinemast/libjson-rpc-cpp;branch=master;protocol=https \
13 file://0001-cmake-Remove-usage-of-obsolete-MacOS-only-policy.patch \
14 "
13 15
14SRCREV = "ec5ce12fc9c0299e1454cc002c70218b5a6f005b" 16SRCREV = "ec5ce12fc9c0299e1454cc002c70218b5a6f005b"
15 17
@@ -22,6 +24,7 @@ inherit cmake
22EXTRA_OECMAKE += "-DCOMPILE_TESTS=NO -DCOMPILE_STUBGEN=NO -DCOMPILE_EXAMPLES=NO \ 24EXTRA_OECMAKE += "-DCOMPILE_TESTS=NO -DCOMPILE_STUBGEN=NO -DCOMPILE_EXAMPLES=NO \
23 -DBUILD_SHARED_LIBS=YES -DBUILD_STATIC_LIBS=YES \ 25 -DBUILD_SHARED_LIBS=YES -DBUILD_STATIC_LIBS=YES \
24 -DCMAKE_LIBRARY_PATH=${libdir} \ 26 -DCMAKE_LIBRARY_PATH=${libdir} \
27 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
25" 28"
26 29
27do_install:append() { 30do_install:append() {