[jwt-cpp] Update to version 0.7.1 (#46342)

This commit is contained in:
avaliente-evs
2025-07-10 19:53:29 +02:00
committed by GitHub
parent 8ebda5cd30
commit 96fd599859
6 changed files with 62 additions and 41 deletions

View File

@@ -1,33 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5cd876f..8e3dfe6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,9 +66,8 @@ if(JWT_EXTERNAL_PICOJSON)
find_package(picojson 1.3.0 REQUIRED)
endif()
-find_package(nlohmann_json CONFIG)
-if(NOT nlohmann_json_FOUND)
+if(0)
message(STATUS "jwt-cpp: using FetchContent for nlohmann json")
include(FetchContent)
FetchContent_Declare(nlohmann_json
@@ -121,6 +120,9 @@ endif()
if(JWT_EXTERNAL_PICOJSON)
target_link_libraries(jwt-cpp INTERFACE picojson::picojson>)
+else()
+ find_path(PICOJSON_INCLUDE_DIR "picojson/picojson.h" REQUIRED)
+ target_include_directories(jwt-cpp INTERFACE "${PICOJSON_INCLUDE_DIR}")
endif()
# Hunter needs relative paths so the files are placed correctly
@@ -139,7 +141,6 @@ install(EXPORT jwt-cpp-targets NAMESPACE jwt-cpp:: FILE jwt-cpp-targets.cmake
DESTINATION ${JWT_CMAKE_FILES_INSTALL_DIR})
install(DIRECTORY ${JWT_INCLUDE_PATH}/jwt-cpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
if(NOT JWT_EXTERNAL_PICOJSON AND NOT JWT_DISABLE_PICOJSON)
- install(FILES ${JWT_INCLUDE_PATH}/picojson/picojson.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/picojson)
endif()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jwt-cpp-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/jwt-cpp-config-version.cmake
DESTINATION ${JWT_CMAKE_FILES_INSTALL_DIR})

View File

@@ -0,0 +1,35 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2520e4e..93034ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,7 +70,7 @@ elseif(${JWT_SSL_LIBRARY} MATCHES "wolfSSL")
endif()
if(NOT JWT_DISABLE_PICOJSON AND JWT_EXTERNAL_PICOJSON)
- find_package(picojson 1.3.0 REQUIRED)
+ find_path(PICOJSON_INCLUDE_DIR "picojson/picojson.h" REQUIRED)
endif()
if(JWT_BUILD_EXAMPLES OR JWT_BUILD_TESTS)
@@ -132,7 +132,7 @@ if(${JWT_SSL_LIBRARY} MATCHES "wolfSSL")
endif()
if(NOT JWT_DISABLE_PICOJSON AND JWT_EXTERNAL_PICOJSON)
- target_link_libraries(jwt-cpp INTERFACE picojson::picojson>)
+ target_include_directories(jwt-cpp INTERFACE "${PICOJSON_INCLUDE_DIR}")
endif()
# Hunter needs relative paths so the files are placed correctly
diff --git a/cmake/jwt-cpp-config.cmake.in b/cmake/jwt-cpp-config.cmake.in
index d0e7cd0..ba563a2 100644
--- a/cmake/jwt-cpp-config.cmake.in
+++ b/cmake/jwt-cpp-config.cmake.in
@@ -13,8 +13,4 @@ else()
find_dependency(${JWT_SSL_LIBRARY} REQUIRED)
endif()
-if(NOT JWT_DISABLE_PICOJSON AND JWT_EXTERNAL_PICOJSON)
- find_dependency(picojson REQUIRED)
-endif()
-
include("${CMAKE_CURRENT_LIST_DIR}/jwt-cpp-targets.cmake")

View File

@@ -4,16 +4,24 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Thalhammer/jwt-cpp
REF "v${VERSION}"
SHA512 b6fdb93e3f2f065a2eb45fe16cb076a932b8d4bfad2251bd66d2be40d8afaf5c27a9cf17aaea61d8bfa3f5ff9ed3b45f90962dc14d72704ac5b9d717c12cc79f
SHA512 1d52816e4d04a50c57e3655e1ebd0fa4e54d03aef49950b800c9c43715cdaceec7a572a02ffff5d358d5f8cde242112da06804fc7a53bc154b3860cf133716a0
HEAD_REF master
PATCHES
external-json.diff
picojson_from_vcpkg.patch
)
file(REMOVE_RECURSE "${SOURCE_PATH}/include/picojson")
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
picojson JWT_DISABLE_PICOJSON
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DJWT_EXTERNAL_PICOJSON=ON
-DJWT_BUILD_EXAMPLES=OFF
-DJWT_CMAKE_FILES_INSTALL_DIR=share/${PORT}
)

View File

@@ -1,13 +1,11 @@
{
"name": "jwt-cpp",
"version-semver": "0.7.0",
"port-version": 1,
"version-semver": "0.7.1",
"description": "A header only library for creating and validating json web tokens in c++",
"homepage": "https://github.com/Thalhammer/jwt-cpp",
"license": "MIT",
"dependencies": [
"openssl",
"picojson",
{
"name": "vcpkg-cmake",
"host": true
@@ -16,5 +14,13 @@
"name": "vcpkg-cmake-config",
"host": true
}
]
],
"features": {
"picojson": {
"description": "Use picojson for JSON handling",
"dependencies": [
"picojson"
]
}
}
}

View File

@@ -4073,8 +4073,8 @@
"port-version": 0
},
"jwt-cpp": {
"baseline": "0.7.0",
"port-version": 1
"baseline": "0.7.1",
"port-version": 0
},
"jxrlib": {
"baseline": "2019.10.9",

View File

@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ea05d60af2b258cd36d6c2e440653b6863568a2e",
"version-semver": "0.7.1",
"port-version": 0
},
{
"git-tree": "b0890909dce2e5ce69df737f928c152dd432a6d8",
"version-semver": "0.7.0",