[glaze/saucer] Update glaze to 2.9.2 and saucer to 2.3.0 (#39524)

Co-authored-by: Monica <v-liumonica@microsoft.com>
This commit is contained in:
MonicaLiu 2024-07-13 07:16:23 -07:00 committed by GitHub
parent 444fda8550
commit 495a22d89f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 46 additions and 15 deletions

View File

@ -6,7 +6,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO stephenberry/glaze
REF "v${VERSION}"
SHA512 d9bcd4e6dc9bd44d87ef392c0820e9eb8adc3d5b70b0639e02dcf81b05bcb853a0418b23aef496cd86f036d30591210cccdaf80436741b1a5083c53ee4d4195c
SHA512 9e5f306eae1514625e28f9751bb241a7c54deecc2caa53e78c1fd8ebe7fd28f22384a2cf6baba68c2f8fa8728f1612666d1c3efe9d586e8bec3e2ff35113b252
)
vcpkg_cmake_configure(

View File

@ -1,6 +1,6 @@
{
"name": "glaze",
"version": "2.6.9",
"version": "2.9.2",
"description": "One of the fastest JSON libraries in the world. Glaze reads and writes from C++ memory, simplifying interfaces and offering incredible performance.",
"homepage": "https://github.com/stephenberry/glaze",
"license": "MIT",

View File

@ -1,20 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d5eccb6..5f9ab71 100644
index 5ac3f20..d4e3864 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,51 +131,16 @@ endif()
@@ -134,57 +134,17 @@ endif()
include("cmake/cpm.cmake")
include("cmake/nuget.cmake")
-CPMFindPackage(
- NAME lockpp
- VERSION 2.6
- VERSION 2.7
- GIT_REPOSITORY "https://github.com/Soundux/lockpp"
-)
-
-CPMFindPackage(
- NAME boost_callable_traits
- GIT_TAG boost-1.83.0
- GIT_TAG boost-1.84.0
- GIT_REPOSITORY "https://github.com/boostorg/callable_traits"
-)
-
@ -39,7 +39,7 @@ index d5eccb6..5f9ab71 100644
-
-CPMFindPackage(
- NAME glaze
- VERSION 1.5.4
- VERSION 1.9.9
- GIT_REPOSITORY "https://github.com/stephenberry/glaze"
-)
-
@ -48,6 +48,12 @@ index d5eccb6..5f9ab71 100644
- VERSION 2.1
- GIT_REPOSITORY "https://github.com/Curve/flagpp"
-)
-
-CPMFindPackage(
- NAME boost_preprocessor
- GIT_TAG boost-1.84.0
- GIT_REPOSITORY "https://github.com/boostorg/preprocessor"
-)
+find_path(LOCKPP_INCLUDE_DIRS "lockpp")
+find_path(BOOST_CALLTRA_INCLUDE_DIRS "boost/callable_traits")
+find_package(tl-expected CONFIG REQUIRED)
@ -55,15 +61,16 @@ index d5eccb6..5f9ab71 100644
+find_package(fmt CONFIG REQUIRED)
+find_package(glaze CONFIG REQUIRED)
+find_path(FLAGPP_INCLUDE_DIRS "flagpp")
+find_path(BOOST_PREPROCESSOR_INCLUDE_DIRS "boost/preprocessor")
-target_link_libraries(${PROJECT_NAME} PRIVATE cr::flagpp)
-target_link_libraries(${PROJECT_NAME} PRIVATE boost_preprocessor cr::flagpp)
-target_link_libraries(${PROJECT_NAME} PUBLIC lockpp boost_callable_traits tl::expected glaze::glaze ereignis fmt)
+target_include_directories(${PROJECT_NAME} PRIVATE ${EREIGNIS_INCLUDE_DIRS} ${LOCKPP_INCLUDE_DIRS} ${BOOST_CALLTRA_INCLUDE_DIRS} ${FLAGPP_INCLUDE_DIRS})
+target_include_directories(${PROJECT_NAME} PRIVATE ${EREIGNIS_INCLUDE_DIRS} ${LOCKPP_INCLUDE_DIRS} ${BOOST_CALLTRA_INCLUDE_DIRS} ${FLAGPP_INCLUDE_DIRS} ${BOOST_PREPROCESSOR_INCLUDE_DIRS})
+target_link_libraries(${PROJECT_NAME} PRIVATE glaze::glaze fmt::fmt tl::expected)
# --------------------------------------------------------------------------------------------------------
# Setup Linkage
@@ -218,7 +183,7 @@ if (saucer_backend STREQUAL "WebView2")
@@ -227,7 +187,7 @@ if (saucer_backend STREQUAL "WebView2")
target_compile_definitions(${PROJECT_NAME} PRIVATE UNICODE=1 _UNICODE=1 NOMINMAX=1)
include("cmake/webview2.cmake")
@ -72,7 +79,7 @@ index d5eccb6..5f9ab71 100644
endif()
# --------------------------------------------------------------------------------------------------------
@@ -258,6 +223,4 @@ if (saucer_prefer_remote AND saucer_backend STREQUAL "WebView2")
@@ -267,6 +227,4 @@ if (saucer_prefer_remote AND saucer_backend STREQUAL "WebView2")
endif()
install(DIRECTORY "include/saucer" TYPE INCLUDE)
@ -98,3 +105,16 @@ index 9ee3dbc..3827e94 100644
nuget_add(WebView2 "Microsoft.Web.WebView2" ${saucer_webview2_version})
add_library(webview2 STATIC IMPORTED)
diff --git a/src/serializer.glaze.cpp b/src/serializer.glaze.cpp
index 38e891c..a4f8768 100644
--- a/src/serializer.glaze.cpp
+++ b/src/serializer.glaze.cpp
@@ -38,7 +38,7 @@ namespace saucer::serializers
}
template <typename T>
- tl::expected<T, glz::parse_error> parse_as(const std::string &buffer)
+ tl::expected<T, glz::error_ctx> parse_as(const std::string &buffer)
{
static constexpr auto opts = glz::opts{.error_on_missing_keys = true, .raw_string = false};

View File

@ -4,7 +4,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO saucer/saucer
REF "v${VERSION}"
SHA512 29abb465a888aa4284795e293624598c09e0ba690bb430adb7a2122d82985daa1cfcfd594120f5657fc70349f8480e63554d72bff1b23f9dca86bcdbb930d953
SHA512 6b5090c7754cac99d410ae59e207a44cd58db7fc9ee59412181c13449c5aed7e1cb61b1ec0703809084b406e01bbb821ecafa5caee4c2704ef72f07d2979a7e0
HEAD_REF dev
PATCHES
fix_findpkg.patch

View File

@ -1,12 +1,13 @@
{
"name": "saucer",
"version": "2.1.0",
"version": "2.3.0",
"description": "Next-gen desktop apps with web-frontend in C++",
"homepage": "https://saucer.github.io/",
"license": "MIT",
"supports": "!uwp",
"dependencies": [
"boost-callable-traits",
"boost-preprocessor",
"ereignis",
"flagpp",
"fmt",

View File

@ -3069,7 +3069,7 @@
"port-version": 0
},
"glaze": {
"baseline": "2.6.9",
"baseline": "2.9.2",
"port-version": 0
},
"glbinding": {
@ -7953,7 +7953,7 @@
"port-version": 0
},
"saucer": {
"baseline": "2.1.0",
"baseline": "2.3.0",
"port-version": 0
},
"sbp": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "07fd2554e69c3af68015a718993df81afa508994",
"version": "2.9.2",
"port-version": 0
},
{
"git-tree": "e4c7bcd9cc4ef7d76f13f2406500af8e13bb25e2",
"version": "2.6.9",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "65f56fc183c1735f4c6c239f660b5dfc35ba3281",
"version": "2.3.0",
"port-version": 0
},
{
"git-tree": "0ad0dc8844c60450afe70ba393b6d31a517b553d",
"version": "2.1.0",