diff options
author | Wang Mingyu <wangmy@fujitsu.com> | 2023-08-16 09:54:16 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-08-15 20:07:54 -0700 |
commit | 5df72d5a190cb5d9092cbf4ecc6f91c42612719c (patch) | |
tree | 5abe77d213af33e2282e5e5614ad3940a84f827b /meta-oe/recipes-support | |
parent | b5cd5680f151472a3656fd5d3d9ca47f306bd68c (diff) | |
download | meta-openembedded-5df72d5a190cb5d9092cbf4ecc6f91c42612719c.tar.gz |
yaml-cpp: upgrade 0.7.0 -> 0.8.0
0001-Fix-CMake-export-files-1077.patch
removed since it's included in 0.8.0
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r-- | meta-oe/recipes-support/yaml-cpp/yaml-cpp/0001-Fix-CMake-export-files-1077.patch | 117 | ||||
-rw-r--r-- | meta-oe/recipes-support/yaml-cpp/yaml-cpp_0.8.0.bb (renamed from meta-oe/recipes-support/yaml-cpp/yaml-cpp_0.7.0.bb) | 3 |
2 files changed, 1 insertions, 119 deletions
diff --git a/meta-oe/recipes-support/yaml-cpp/yaml-cpp/0001-Fix-CMake-export-files-1077.patch b/meta-oe/recipes-support/yaml-cpp/yaml-cpp/0001-Fix-CMake-export-files-1077.patch deleted file mode 100644 index b6c4a3b88..000000000 --- a/meta-oe/recipes-support/yaml-cpp/yaml-cpp/0001-Fix-CMake-export-files-1077.patch +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | From 3d436f6cfc2dfe52fc1533c01f57c25ae7ffac9c Mon Sep 17 00:00:00 2001 | ||
2 | From: Felix Schwitzer <flx107809@gmail.com> | ||
3 | Date: Fri, 1 Apr 2022 05:26:47 +0200 | ||
4 | Subject: [PATCH] Fix CMake export files (#1077) | ||
5 | |||
6 | After configuring the file `yaml-cpp-config.cmake.in`, the result ends up with | ||
7 | empty variables. (see also the discussion in #774). | ||
8 | |||
9 | Rework this file and the call to `configure_package_config_file` according the | ||
10 | cmake documentation | ||
11 | (https://cmake.org/cmake/help/v3.22/module/CMakePackageConfigHelpers.html?highlight=configure_package_config#command:configure_package_config_file) | ||
12 | to overcome this issue and allow a simple `find_package` after install. | ||
13 | |||
14 | As there was some discussion about the place where to install the | ||
15 | `yaml-cpp-config.cmake` file, e.g. #1055, factor out the install location into | ||
16 | an extra variable to make it easier changing this location in the future. | ||
17 | |||
18 | Also untabify CMakeLists.txt in some places to align with the other code parts in this file. | ||
19 | |||
20 | Upstream-Status: Accepted [https://github.com/jbeder/yaml-cpp/pull/1077] | ||
21 | |||
22 | Signed-off-by: Jasper Orschulko <jasper@fancydomain.eu> | ||
23 | --- | ||
24 | CMakeLists.txt | 29 ++++++++++++++++++----------- | ||
25 | yaml-cpp-config.cmake.in | 10 ++++++---- | ||
26 | 2 files changed, 24 insertions(+), 15 deletions(-) | ||
27 | |||
28 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
29 | index b230b9e..983d1a4 100644 | ||
30 | --- a/CMakeLists.txt | ||
31 | +++ b/CMakeLists.txt | ||
32 | @@ -127,10 +127,16 @@ set_target_properties(yaml-cpp PROPERTIES | ||
33 | PROJECT_LABEL "yaml-cpp ${yaml-cpp-label-postfix}" | ||
34 | DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}") | ||
35 | |||
36 | +# FIXME(felix2012): A more common place for the cmake export would be | ||
37 | +# `CMAKE_INSTALL_LIBDIR`, as e.g. done in ubuntu or in this project for GTest | ||
38 | +set(CONFIG_EXPORT_DIR "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp") | ||
39 | +set(EXPORT_TARGETS yaml-cpp) | ||
40 | configure_package_config_file( | ||
41 | "${PROJECT_SOURCE_DIR}/yaml-cpp-config.cmake.in" | ||
42 | "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake" | ||
43 | - INSTALL_DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp") | ||
44 | + INSTALL_DESTINATION "${CONFIG_EXPORT_DIR}" | ||
45 | + PATH_VARS CMAKE_INSTALL_INCLUDEDIR CONFIG_EXPORT_DIR) | ||
46 | +unset(EXPORT_TARGETS) | ||
47 | |||
48 | write_basic_package_version_file( | ||
49 | "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" | ||
50 | @@ -139,30 +145,31 @@ write_basic_package_version_file( | ||
51 | configure_file(yaml-cpp.pc.in yaml-cpp.pc @ONLY) | ||
52 | |||
53 | if (YAML_CPP_INSTALL) | ||
54 | - install(TARGETS yaml-cpp | ||
55 | + install(TARGETS yaml-cpp | ||
56 | EXPORT yaml-cpp-targets | ||
57 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
58 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
59 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
60 | - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ | ||
61 | + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ | ||
62 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
63 | - FILES_MATCHING PATTERN "*.h") | ||
64 | + FILES_MATCHING PATTERN "*.h") | ||
65 | install(EXPORT yaml-cpp-targets | ||
66 | - DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp") | ||
67 | - install(FILES | ||
68 | - "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake" | ||
69 | - "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" | ||
70 | - DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/yaml-cpp") | ||
71 | + DESTINATION "${CONFIG_EXPORT_DIR}") | ||
72 | + install(FILES | ||
73 | + "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake" | ||
74 | + "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" | ||
75 | + DESTINATION "${CONFIG_EXPORT_DIR}") | ||
76 | install(FILES "${PROJECT_BINARY_DIR}/yaml-cpp.pc" | ||
77 | DESTINATION ${CMAKE_INSTALL_DATADIR}/pkgconfig) | ||
78 | endif() | ||
79 | +unset(CONFIG_EXPORT_DIR) | ||
80 | |||
81 | if(YAML_CPP_BUILD_TESTS) | ||
82 | - add_subdirectory(test) | ||
83 | + add_subdirectory(test) | ||
84 | endif() | ||
85 | |||
86 | if(YAML_CPP_BUILD_TOOLS) | ||
87 | - add_subdirectory(util) | ||
88 | + add_subdirectory(util) | ||
89 | endif() | ||
90 | |||
91 | if (YAML_CPP_CLANG_FORMAT_EXE) | ||
92 | diff --git a/yaml-cpp-config.cmake.in b/yaml-cpp-config.cmake.in | ||
93 | index 7b41e3f..a7ace3d 100644 | ||
94 | --- a/yaml-cpp-config.cmake.in | ||
95 | +++ b/yaml-cpp-config.cmake.in | ||
96 | @@ -3,12 +3,14 @@ | ||
97 | # YAML_CPP_INCLUDE_DIR - include directory | ||
98 | # YAML_CPP_LIBRARIES - libraries to link against | ||
99 | |||
100 | -# Compute paths | ||
101 | -get_filename_component(YAML_CPP_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
102 | -set(YAML_CPP_INCLUDE_DIR "@CONFIG_INCLUDE_DIRS@") | ||
103 | +@PACKAGE_INIT@ | ||
104 | + | ||
105 | +set_and_check(YAML_CPP_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") | ||
106 | |||
107 | # Our library dependencies (contains definitions for IMPORTED targets) | ||
108 | -include("${YAML_CPP_CMAKE_DIR}/yaml-cpp-targets.cmake") | ||
109 | +include(@PACKAGE_CONFIG_EXPORT_DIR@/yaml-cpp-targets.cmake) | ||
110 | |||
111 | # These are IMPORTED targets created by yaml-cpp-targets.cmake | ||
112 | set(YAML_CPP_LIBRARIES "@EXPORT_TARGETS@") | ||
113 | + | ||
114 | +check_required_components(@EXPORT_TARGETS@) | ||
115 | -- | ||
116 | 2.39.2 | ||
117 | |||
diff --git a/meta-oe/recipes-support/yaml-cpp/yaml-cpp_0.7.0.bb b/meta-oe/recipes-support/yaml-cpp/yaml-cpp_0.8.0.bb index e04d4705a..44ac0687a 100644 --- a/meta-oe/recipes-support/yaml-cpp/yaml-cpp_0.7.0.bb +++ b/meta-oe/recipes-support/yaml-cpp/yaml-cpp_0.8.0.bb | |||
@@ -8,8 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=6a8aaf0595c2efc1a9c2e0913e9c1a2c" | |||
8 | # yaml-cpp releases are stored as archive files in github. | 8 | # yaml-cpp releases are stored as archive files in github. |
9 | # download the exact revision of release | 9 | # download the exact revision of release |
10 | SRC_URI = "git://github.com/jbeder/yaml-cpp.git;branch=master;protocol=https" | 10 | SRC_URI = "git://github.com/jbeder/yaml-cpp.git;branch=master;protocol=https" |
11 | SRC_URI += "file://0001-Fix-CMake-export-files-1077.patch" | 11 | SRCREV = "f7320141120f720aecc4c32be25586e7da9eb978" |
12 | SRCREV = "0579ae3d976091d7d664aa9d2527e0d0cff25763" | ||
13 | 12 | ||
14 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
15 | 14 | ||