File tree Expand file tree Collapse file tree 7 files changed +20
-25458
lines changed Expand file tree Collapse file tree 7 files changed +20
-25458
lines changed Original file line number Diff line number Diff line change 78
78
- uses : actions/checkout@v2
79
79
- name : install cmake
80
80
run : |
81
- wget https://cmake.org/files/v3.12 /cmake-3.12.4 .tar.gz
82
- tar -zxf cmake-3.12.4 .tar.gz
83
- cd cmake-3.12.4
81
+ wget https://cmake.org/files/v3.14 /cmake-3.14.7 .tar.gz
82
+ tar -zxf cmake-3.14.7 .tar.gz
83
+ cd cmake-3.14.7
84
84
./bootstrap
85
85
make -j $(nproc)
86
86
sudo make install
Original file line number Diff line number Diff line change 38
38
with :
39
39
version : ${{matrix.target.tag}}
40
40
41
- - if : matrix.target.name == 'nlohmann-json'
42
- run : rm -rf include/nlohmann
43
41
- if : matrix.target.name == 'nlohmann-json'
44
42
uses : ./.github/actions/install/nlohmann-json
45
43
with :
Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.12 )
1
+ cmake_minimum_required (VERSION 3.14 )
2
2
3
3
# HUNTER_ENABLED is always set if this package is included in a project using hunter (HunterGate sets it) In this case
4
4
# we will use hunter as well to stay consistent. If not the use can supply it on configure to force using hunter.
@@ -62,6 +62,16 @@ if(JWT_EXTERNAL_PICOJSON)
62
62
find_package (picojson 1.3.0 REQUIRED )
63
63
endif ()
64
64
65
+ find_package (nlohmann_json CONFIG )
66
+
67
+ if (NOT nlohmann_json_FOUND )
68
+ include (FetchContent )
69
+
70
+ fetchcontent_declare (nlohmann_json GIT_REPOSITORY https://github.com/nlohmann/json.git GIT_TAG v3.11.2 )
71
+
72
+ fetchcontent_makeavailable (nlohmann_json )
73
+ endif ()
74
+
65
75
set (JWT_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /include )
66
76
set (JWT_HEADER_FILES ${JWT_INCLUDE_PATH} /jwt-cpp/jwt.h )
67
77
foreach (traits ${JWT_JSON_TRAITS_OPTIONS} )
@@ -107,7 +117,7 @@ if(JWT_EXTERNAL_PICOJSON)
107
117
target_link_libraries (jwt-cpp INTERFACE picojson::picojson> )
108
118
endif ()
109
119
110
- # Hunter needs relative paths so the files are palced correctly
120
+ # Hunter needs relative paths so the files are placed correctly
111
121
if (NOT JWT_CMAKE_FILES_INSTALL_DIR )
112
122
set (JWT_CMAKE_FILES_INSTALL_DIR cmake )
113
123
endif ()
Original file line number Diff line number Diff line change @@ -30,4 +30,4 @@ add_executable(es256k es256k.cpp)
30
30
target_link_libraries (es256k jwt-cpp::jwt-cpp )
31
31
32
32
add_executable (partial-claim-verifier partial-claim-verifier.cpp )
33
- target_link_libraries (partial-claim-verifier jwt-cpp::jwt-cpp )
33
+ target_link_libraries (partial-claim-verifier jwt-cpp::jwt-cpp nlohmann_json::nlohmann_json )
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ endif()
19
19
20
20
find_package (nlohmann_json CONFIG )
21
21
if (TARGET nlohmann_json::nlohmann_json )
22
- add_executable (nlohmann-json nlohmann-json.cpp )
23
- target_link_libraries (nlohmann-json nlohmann_json::nlohmann_json jwt-cpp::jwt-cpp )
22
+ add_executable (nlohmann-json nlohmann-json.cpp )
23
+ target_link_libraries (nlohmann-json nlohmann_json::nlohmann_json jwt-cpp::jwt-cpp )
24
24
endif ()
25
25
26
26
include ("../../cmake/private-find-kazuho-picojson.cmake" )
You can’t perform that action at this time.
0 commit comments