mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-12-14 06:16:04 +01:00
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>
This commit is contained in:
parent
90e240756c
commit
b7a6d63835
|
|
@ -0,0 +1,38 @@
|
|||
From 7cc415c5b2406b16adcccdce3fc8bf5223a1bdb1 Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Haase <Moritz.Haase@bmw.de>
|
||||
Date: Fri, 11 Jul 2025 12:31:49 +0200
|
||||
Subject: [PATCH] cmake: Remove usage of obsolete MacOS-only policy
|
||||
|
||||
Workaround an error reported by CMake 4 that only affects MacOS.
|
||||
|
||||
CMake Error at CMakeLists.txt:21 (cmake_policy):
|
||||
Policy CMP0042 may not be set to OLD behavior because this version of CMake
|
||||
no longer supports it. The policy was introduced in CMake version 3.0.0,
|
||||
and use of NEW behavior is now required.
|
||||
|
||||
Please either update your CMakeLists.txt files to conform to the new
|
||||
behavior or use an older version of CMake that still supports the old
|
||||
behavior. Run cmake --help-policy CMP0042 for more information.
|
||||
|
||||
Upstream-Status: Inactive-Upstream [2022-01-12]
|
||||
Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
|
||||
---
|
||||
CMakeLists.txt | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 961e55a..909610b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -16,11 +16,6 @@ project(libjson-rpc-cpp)
|
||||
cmake_policy(SET CMP0007 NEW)
|
||||
cmake_policy(SET CMP0012 NEW)
|
||||
|
||||
-if (${CMAKE_MAJOR_VERSION} GREATER 2)
|
||||
- # old policy do not use MACOSX_RPATH
|
||||
- cmake_policy(SET CMP0042 OLD)
|
||||
-endif()
|
||||
-
|
||||
set(MAJOR_VERSION 1)
|
||||
set(MINOR_VERSION 4)
|
||||
set(PATCH_VERSION 1)
|
||||
|
|
@ -9,7 +9,9 @@ SECTION = "libs"
|
|||
|
||||
DEPENDS = "curl jsoncpp libmicrohttpd hiredis"
|
||||
|
||||
SRC_URI = "git://github.com/cinemast/libjson-rpc-cpp;branch=master;protocol=https"
|
||||
SRC_URI = "git://github.com/cinemast/libjson-rpc-cpp;branch=master;protocol=https \
|
||||
file://0001-cmake-Remove-usage-of-obsolete-MacOS-only-policy.patch \
|
||||
"
|
||||
|
||||
SRCREV = "ec5ce12fc9c0299e1454cc002c70218b5a6f005b"
|
||||
|
||||
|
|
@ -22,6 +24,7 @@ inherit cmake
|
|||
EXTRA_OECMAKE += "-DCOMPILE_TESTS=NO -DCOMPILE_STUBGEN=NO -DCOMPILE_EXAMPLES=NO \
|
||||
-DBUILD_SHARED_LIBS=YES -DBUILD_STATIC_LIBS=YES \
|
||||
-DCMAKE_LIBRARY_PATH=${libdir} \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
||||
"
|
||||
|
||||
do_install:append() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user