[yaml-cpp] Update patch with upstream fixes. (#35058)

The patch from https://github.com/jbeder/yaml-cpp/pull/1242 fixes
loading the CMake config multiple times.
This commit is contained in:
Pierre Wendling 2023-11-14 21:41:42 +01:00 committed by GitHub
parent 6d0e15bdb1
commit 47e01f3ea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 10 deletions

View File

@ -1,6 +1,7 @@
{
"name": "yaml-cpp",
"version-semver": "0.8.0",
"port-version": 1,
"description": "yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec.",
"homepage": "https://github.com/jbeder/yaml-cpp",
"documentation": "https://codedocs.xyz/jbeder/yaml-cpp/index.html",

View File

@ -46,12 +46,11 @@ index 46dc180..5055c24 100644
if(YAML_CPP_BUILD_TESTS)
add_subdirectory(test)
diff --git a/yaml-cpp-config.cmake.in b/yaml-cpp-config.cmake.in
index 799b9b418..f71e13b8f 100644
index 799b9b4..cbbc773 100644
--- a/yaml-cpp-config.cmake.in
+++ b/yaml-cpp-config.cmake.in
@@ -11,12 +11,20 @@ set_and_check(YAML_CPP_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
@@ -11,12 +11,23 @@ set_and_check(YAML_CPP_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set_and_check(YAML_CPP_LIBRARY_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
# Are we building shared libraries?
@ -66,12 +65,15 @@ index 799b9b418..f71e13b8f 100644
set(YAML_CPP_LIBRARIES "@EXPORT_TARGETS@")
-check_required_components(@EXPORT_TARGETS@)
+add_library(yaml-cpp INTERFACE IMPORTED)
+target_link_libraries(yaml-cpp INTERFACE yaml-cpp::yaml-cpp)
+if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
+ set_target_properties(yaml-cpp PROPERTIES
+ DEPRECATION "The target yaml-cpp is deprecated and will be removed in version 0.10.0. Use the yaml-cpp::yaml-cpp target instead."
+ )
+# Protect against multiple inclusion, which would fail when already imported targets are added once more.
+if(NOT TARGET yaml-cpp)
+ add_library(yaml-cpp INTERFACE IMPORTED)
+ target_link_libraries(yaml-cpp INTERFACE yaml-cpp::yaml-cpp)
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
+ set_target_properties(yaml-cpp PROPERTIES
+ DEPRECATION "The target yaml-cpp is deprecated and will be removed in version 0.10.0. Use the yaml-cpp::yaml-cpp target instead."
+ )
+ endif()
+endif()
+
+check_required_components(yaml-cpp)

View File

@ -9234,7 +9234,7 @@
},
"yaml-cpp": {
"baseline": "0.8.0",
"port-version": 0
"port-version": 1
},
"yara": {
"baseline": "4.3.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "eb1a38369faa80d2af500df32ef6d4a747336dcb",
"version-semver": "0.8.0",
"port-version": 1
},
{
"git-tree": "595f95f94e93c518b99e8c0e83ef35ced9e7867a",
"version-semver": "0.8.0",