Files
LFS-PKGBUILDs/dev-libs/protobuf-31.1/protobuf-30.0-findJsonCpp.patch

45 lines
1.4 KiB
Diff

From 2fe6cac5797bead74c473c795fdc5f9d50703894 Mon Sep 17 00:00:00 2001
From: Paul Zander <negril.nx+gentoo@gmail.com>
Date: Thu, 6 Mar 2025 13:19:01 +0100
Subject: [PATCH] fix JsonCPP name
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
diff --git a/cmake/conformance.cmake b/cmake/conformance.cmake
index 7377841..dba05aa 100644
--- a/cmake/conformance.cmake
+++ b/cmake/conformance.cmake
@@ -1,9 +1,9 @@
# Don't run jsoncpp tests.
set(JSONCPP_WITH_TESTS OFF)
-if (NOT TARGET jsoncpp_lib)
+if (NOT TARGET JsonCpp::JsonCpp)
if (NOT protobuf_FORCE_FETCH_DEPENDENCIES)
- find_package(jsoncpp)
+ find_package(JsonCpp)
endif()
# Fallback to fetching Googletest from github if it's not found locally.
@@ -21,7 +21,7 @@ if (NOT TARGET jsoncpp_lib)
endif()
endif()
-if (NOT TARGET jsoncpp_lib)
+if (NOT TARGET JsonCpp::JsonCpp)
message(FATAL_ERROR
"Cannot find jsoncpp dependency that's needed to build conformance tests.\n"
"If instead you want to skip these tests, run cmake with:\n"
@@ -151,7 +151,7 @@ add_test(NAME conformance_cpp_test
set(JSONCPP_WITH_TESTS OFF CACHE BOOL "Disable tests")
if(BUILD_SHARED_LIBS)
- target_link_libraries(conformance_test_runner jsoncpp_lib)
+ target_link_libraries(conformance_test_runner JsonCpp::JsonCpp)
else()
target_link_libraries(conformance_test_runner jsoncpp_static)
endif()
--
2.48.1