Files
jwt-cpp/example/traits/CMakeLists.txt
Chris Mc df914eba76 🪞 Add support for reflect-cpp's JSON (#421)
* add reflect json traits

* jwt-cpp defaults

* fix clang tidy warnings

* fix clang tidy warnings

* rename directory

* add tests

* add tests

* add tests

* replace unnecessary copy with move

* gate reflect cpp tests behind flag

* reflect cpp CI work

* reflect-cpp example

* reflect-cpp CI

* reflect-cpp CI

* match naming + update ci

* first pass code review

* linter

* linter

* align naming

* make file +x

* align target name

fix order or targets in tests

* fix typo

* Fix target_link_libraries syntax for jwt-cpp

* cleanup example code

* add reflect-json to coverage tests

---------

Co-authored-by: Ali Girayhan Ozbay <aligirayhan.ozbay@abex.capital>
Co-authored-by: Ali Girayhan Özbay <aligirayhan@ozbay.org>
2026-03-09 22:19:31 -07:00

51 lines
1.7 KiB
CMake

cmake_minimum_required(VERSION 3.14)
project(jwt-cpp-traits)
if(NOT TARGET jwt-cpp)
find_package(jwt-cpp CONFIG REQUIRED)
endif()
find_package(jsoncons CONFIG)
if(TARGET jsoncons)
add_executable(danielaparker-jsoncons danielaparker-jsoncons.cpp)
target_link_libraries(danielaparker-jsoncons jwt-cpp::jwt-cpp jsoncons)
endif()
include("../../cmake/private-find-boost-json.cmake")
if(TARGET boost_json)
add_executable(boost-json boost-json.cpp)
target_link_libraries(boost-json jwt-cpp::jwt-cpp boost_json)
endif()
find_package(nlohmann_json CONFIG)
if(TARGET nlohmann_json::nlohmann_json)
add_executable(nlohmann-json nlohmann-json.cpp)
target_link_libraries(nlohmann-json nlohmann_json::nlohmann_json jwt-cpp::jwt-cpp)
endif()
include("../../cmake/private-find-kazuho-picojson.cmake")
if(TARGET kazuho_picojson)
add_executable(kazuho-picojson kazuho-picojson.cpp)
target_link_libraries(kazuho-picojson jwt-cpp::jwt-cpp kazuho_picojson)
endif()
find_package(jsoncpp CONFIG)
if(TARGET jsoncpp_static)
add_executable(open-source-parsers-jsoncpp open-source-parsers-jsoncpp.cpp)
target_link_libraries(open-source-parsers-jsoncpp jsoncpp_static jwt-cpp::jwt-cpp)
endif()
find_package(glaze CONFIG)
if(TARGET glaze::glaze)
add_executable(glaze-json glaze-json.cpp)
target_compile_features(glaze-json PRIVATE cxx_std_23)
target_link_libraries(glaze-json glaze::glaze jwt-cpp::jwt-cpp)
endif()
find_package(reflectcpp CONFIG)
if(TARGET reflectcpp::reflectcpp)
add_executable(reflectcpp-json reflectcpp-json.cpp)
target_compile_features(reflectcpp-json PRIVATE cxx_std_20)
target_link_libraries(reflectcpp-json jwt-cpp::jwt-cpp reflectcpp::reflectcpp)
endif()