mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
The examples have been using older cmake_minimum_required, given support for versions <3.10 is deprecated since 3.31, synchronize the minimum required version from the main CMakeLists.txt (version 3.14) into examples and tests. closes #397
39 lines
1.2 KiB
CMake
39 lines
1.2 KiB
CMake
cmake_minimum_required(VERSION 3.14)
|
|
project(jwt-cpp-examples)
|
|
|
|
if(NOT TARGET jwt-cpp)
|
|
find_package(jwt-cpp CONFIG REQUIRED)
|
|
endif()
|
|
|
|
add_subdirectory(traits)
|
|
|
|
if(JWT_DISABLE_PICOJSON)
|
|
message(FATAL_ERROR "examples require picojson to be available!")
|
|
endif()
|
|
|
|
add_executable(print-claims print-claims.cpp)
|
|
target_link_libraries(print-claims jwt-cpp::jwt-cpp)
|
|
add_custom_target(print-claims-run COMMAND print-claims)
|
|
|
|
add_executable(private-claims private-claims.cpp)
|
|
target_link_libraries(private-claims jwt-cpp::jwt-cpp)
|
|
add_custom_target(private-claims-run COMMAND private-claims)
|
|
|
|
add_executable(rsa-create rsa-create.cpp)
|
|
target_link_libraries(rsa-create jwt-cpp::jwt-cpp)
|
|
add_custom_target(rsa-create-run COMMAND rsa-create)
|
|
|
|
add_executable(rsa-verify rsa-verify.cpp)
|
|
target_link_libraries(rsa-verify jwt-cpp::jwt-cpp)
|
|
add_custom_target(rsa-verify-run COMMAND rsa-verify)
|
|
|
|
add_executable(jwks-verify jwks-verify.cpp)
|
|
target_link_libraries(jwks-verify jwt-cpp::jwt-cpp)
|
|
add_custom_target(jwks-verify-run COMMAND jwks-verify)
|
|
|
|
add_executable(es256k es256k.cpp)
|
|
target_link_libraries(es256k jwt-cpp::jwt-cpp)
|
|
|
|
add_executable(partial-claim-verifier partial-claim-verifier.cpp)
|
|
target_link_libraries(partial-claim-verifier jwt-cpp::jwt-cpp nlohmann_json::nlohmann_json)
|