From 742d83eea90eb88fc2dbf2751f9ab3907434a56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=A4ssens?= Date: Tue, 28 Oct 2025 16:06:16 +0100 Subject: [PATCH] package/yajl: fix cmake 4 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes deprecated CMake options. Original patch by Rudi Heitbaum, rebased and applies with fuzz 0. CC: Rudi Heitbaum Signed-off-by: Andreas Kässens Signed-off-by: Julien Olivain --- .../0005-Allow-build-with-CMake-4.0.0.patch | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 package/yajl/0005-Allow-build-with-CMake-4.0.0.patch diff --git a/package/yajl/0005-Allow-build-with-CMake-4.0.0.patch b/package/yajl/0005-Allow-build-with-CMake-4.0.0.patch new file mode 100644 index 0000000000..8f162b2249 --- /dev/null +++ b/package/yajl/0005-Allow-build-with-CMake-4.0.0.patch @@ -0,0 +1,68 @@ +From dd88e2ea2fc3f045722f6fee362af2643b5394f5 Mon Sep 17 00:00:00 2001 +From: Rudi Heitbaum +Date: Fri, 28 Mar 2025 09:31:40 +0000 +Subject: [PATCH] Allow build with CMake 4.0.0 + +fixes deprecated cmake option and uses cmake 2.8.0 TARGET_FILE +update cmake supported minimum versions to 2.8.0...3.10 + +ref: +- https://cmake.org/cmake/help/latest/policy/CMP0026.html + +CMake Error at .../CMakeLists.txt: (GET_TARGET_PROPERTY): + The LOCATION property may not be read from target "json_...". Use the + target name directly with add_custom_command, or use the generator + expression $, as appropriate. + +Signed-off-by: Rudi Heitbaum +Fixes: https://autobuild.buildroot.org/results/0b6/0b6ada93f45c16cc8c558ec23a0eb56da2aa86e9 +Upstream: https://github.com/lloyd/yajl/pull/256 +--- + CMakeLists.txt | 2 +- + reformatter/CMakeLists.txt | 4 +--- + verify/CMakeLists.txt | 4 +--- + 3 files changed, 3 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 471eee13..deba3a40 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,7 @@ + # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +-CMAKE_MINIMUM_REQUIRED(VERSION 2.6) ++CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0...3.10) + + PROJECT(YetAnotherJSONParser C) + +diff --git a/reformatter/CMakeLists.txt b/reformatter/CMakeLists.txt +index 52a9bee8..267d02e2 100644 +--- a/reformatter/CMakeLists.txt ++++ b/reformatter/CMakeLists.txt +@@ -39,9 +39,7 @@ IF (NOT WIN32) + ENDIF (NOT WIN32) + + # copy the binary into the output directory +-GET_TARGET_PROPERTY(binPath json_reformat LOCATION) +- + ADD_CUSTOM_COMMAND(TARGET json_reformat POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir}) ++ COMMAND ${CMAKE_COMMAND} -E copy_if_different $ ${binDir}) + + INSTALL(TARGETS json_reformat RUNTIME DESTINATION bin) +diff --git a/verify/CMakeLists.txt b/verify/CMakeLists.txt +index 967fca16..2f390082 100644 +--- a/verify/CMakeLists.txt ++++ b/verify/CMakeLists.txt +@@ -33,9 +33,7 @@ ELSE() + ENDIF() + + # copy in the binary +-GET_TARGET_PROPERTY(binPath json_verify LOCATION) +- + ADD_CUSTOM_COMMAND(TARGET json_verify POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir}) ++ COMMAND ${CMAKE_COMMAND} -E copy_if_different $ ${binDir}) + + INSTALL(TARGETS json_verify RUNTIME DESTINATION bin)