mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 06:08:03 +08:00
[jsoncpp] Fix repeated find_package (#40548)
This commit is contained in:
parent
bc09348780
commit
1e0023878a
15
ports/jsoncpp/cmake-target.diff
Normal file
15
ports/jsoncpp/cmake-target.diff
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/jsoncpp-namespaced-targets.cmake b/jsoncpp-namespaced-targets.cmake
|
||||
index ac1504e..144f086 100644
|
||||
--- a/jsoncpp-namespaced-targets.cmake
|
||||
+++ b/jsoncpp-namespaced-targets.cmake
|
||||
@@ -1,7 +1,9 @@
|
||||
+if (NOT TARGET JsonCpp::JsonCpp)
|
||||
if (TARGET jsoncpp_static)
|
||||
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
||||
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_static")
|
||||
elseif (TARGET jsoncpp_lib)
|
||||
add_library(JsonCpp::JsonCpp INTERFACE IMPORTED)
|
||||
set_target_properties(JsonCpp::JsonCpp PROPERTIES INTERFACE_LINK_LIBRARIES "jsoncpp_lib")
|
||||
+endif ()
|
||||
endif ()
|
||||
\ No newline at end of file
|
@ -4,6 +4,8 @@ vcpkg_from_github(
|
||||
REF "${VERSION}"
|
||||
SHA512 1d06e044759b1e1a4cc4960189dd7e001a0a4389d7239a6d59295af995a553518e4e0337b4b4b817e70da5d9731a4c98655af90791b6287870b5ff8d73ad8873
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
cmake-target.diff
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" JSONCPP_STATIC)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jsoncpp",
|
||||
"version": "1.9.5",
|
||||
"port-version": 4,
|
||||
"port-version": 5,
|
||||
"description": "JsonCpp is a C++ library that allows manipulating JSON values, including serialization and deserialization to and from strings. It can also preserve existing comment in unserialization/serialization steps, making it a convenient format to store user input files.",
|
||||
"homepage": "https://github.com/open-source-parsers/jsoncpp",
|
||||
"license": "MIT",
|
||||
|
@ -3838,7 +3838,7 @@
|
||||
},
|
||||
"jsoncpp": {
|
||||
"baseline": "1.9.5",
|
||||
"port-version": 4
|
||||
"port-version": 5
|
||||
},
|
||||
"jsonifier": {
|
||||
"baseline": "0.9.96",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "176576512ab0d4bb4093ae4f404535a594a1a201",
|
||||
"version": "1.9.5",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "4f722023370407388c3014d52fee17dbe8d65cc3",
|
||||
"version": "1.9.5",
|
||||
|
Loading…
x
Reference in New Issue
Block a user