[glaze] Update to 7.9.1 (#53015)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
xiaozhuai 2026-07-30 14:13:20 +08:00 committed by GitHub
parent 9e593bb18e
commit 80a2d60351
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 102 additions and 3 deletions

View File

@ -0,0 +1,55 @@
diff --git a/cmake/install-config.cmake.in b/cmake/install-config.cmake.in
index dbd6977f..7227a9a8 100644
--- a/cmake/install-config.cmake.in
+++ b/cmake/install-config.cmake.in
@@ -10,6 +10,8 @@ if(_glaze_EETF_FORMAT)
endif()
unset(_glaze_EETF_FORMAT)
+find_dependency(asio REQUIRED)
+
# Handle SSL dependency (OpenSSL)
set(_glaze_ENABLE_SSL "@glaze_ENABLE_SSL@")
if(_glaze_ENABLE_SSL)
@@ -19,13 +21,13 @@ unset(_glaze_ENABLE_SSL)
include("${CMAKE_CURRENT_LIST_DIR}/glazeTargets.cmake")
-# Make the Asio backend selector available to networking consumers. This only
-# declares the glaze_USE_BUNDLED_ASIO option and the glaze_setup_asio() function;
-# nothing is resolved until the consumer calls glaze_setup_asio() and links
-# glaze::asio. Doing so picks the same backend and sets GLZ_USE_BOOST_ASIO exactly
-# as the in-tree build, so glaze/ext/glaze_asio.hpp can never disagree with the
-# linked Asio (issue #2599). Guarded so a source build without the installed
-# module (e.g. add_subdirectory) still configures.
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/glaze-asio.cmake")
- include("${CMAKE_CURRENT_LIST_DIR}/glaze-asio.cmake")
-endif()
+# vcpkg always uses standalone Asio, as declared in the port manifest.
+# Preserve the documented networking interface without selecting Boost or
+# downloading an undeclared dependency.
+if(NOT TARGET glaze::asio)
+ add_library(glaze::asio INTERFACE IMPORTED)
+ set_property(TARGET glaze::asio PROPERTY INTERFACE_LINK_LIBRARIES asio::asio)
+endif()
+
+function(glaze_setup_asio)
+endfunction()
diff --git a/cmake/install-rules.cmake b/cmake/install-rules.cmake
index cae895a7..42accbfc 100644
--- a/cmake/install-rules.cmake
+++ b/cmake/install-rules.cmake
@@ -38,13 +38,6 @@ mark_as_advanced(glaze_INSTALL_CMAKEDIR)
# in-tree builds. FindAsio.cmake travels with it because glaze_setup_asio()
# locates it via CMAKE_CURRENT_FUNCTION_LIST_DIR (issue #2599). glazeConfig.cmake
# includes glaze-asio.cmake so the function is available after find_package(glaze).
-install(
- FILES
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake/glaze-asio.cmake"
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindAsio.cmake"
- DESTINATION "${glaze_INSTALL_CMAKEDIR}"
- COMPONENT glaze_Development
-)
# Read FindErlang.cmake content for embedding into config file
# This avoids installing a separate FindErlang.cmake that could collide with other projects

View File

@ -6,8 +6,10 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO stephenberry/glaze
REF "v${VERSION}"
SHA512 902e3d707f5c2d07bd74abb232ba6dfed78a5b83ed2a9c6151d4cb53ef5724f4162afaba8b398b910c795b03692d0a648f615d89ad4e35ac8fdeeaf7bf1d9eff
SHA512 46867a4ce74b974cfc6d05ee72987242a83c74b5c734488dbf7c608e40c18986ef639f9e16a4ce434e33002321c0d9e5e97dd2c860529860d6ec8c277a83d1cd
HEAD_REF main
PATCHES
001-fix-asio.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@ -26,6 +28,8 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/glaze/ext/glaze_asio.hpp" "#if __has_include(<asio.hpp>) && !defined(GLZ_USE_BOOST_ASIO)" "#if 1")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

View File

@ -1,11 +1,12 @@
{
"name": "glaze",
"version": "7.9.0",
"version": "7.9.1",
"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",
"supports": "!uwp",
"dependencies": [
"asio",
{
"name": "vcpkg-cmake",
"host": true

View File

@ -0,0 +1,4 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
vcpkg_cmake_configure(SOURCE_PATH "${CURRENT_PORT_DIR}/project")
vcpkg_cmake_build()

View File

@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.20)
project(vcpkg_ci_glaze LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(glaze CONFIG REQUIRED)
glaze_setup_asio()
add_executable(vcpkg_ci_glaze main.cpp)
target_link_libraries(vcpkg_ci_glaze PRIVATE glaze::glaze glaze::asio)

View File

@ -0,0 +1,7 @@
#include <glaze/ext/glaze_asio.hpp>
int main()
{
asio::io_context context;
return context.stopped() ? 0 : 1;
}

View File

@ -0,0 +1,12 @@
{
"name": "vcpkg-ci-glaze",
"version-string": "ci",
"description": "Validates Glaze networking CMake integration",
"dependencies": [
"glaze",
{
"name": "vcpkg-cmake",
"host": true
}
]
}

View File

@ -3457,7 +3457,7 @@
"port-version": 0
},
"glaze": {
"baseline": "7.9.0",
"baseline": "7.9.1",
"port-version": 0
},
"glbinding": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "adc4ad2721b8d2e127b94fb756d0adacc760df12",
"version": "7.9.1",
"port-version": 0
},
{
"git-tree": "1c54745d37f1986901a41e652c08919edf889155",
"version": "7.9.0",