diff --git a/README.md b/README.md index 1cdff6e..30b9d58 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ The library has 2 sets of APIs for encoding and decoding: Tested with clang-5.0 and g++-6.4. With issue#12, VS2017 is also supported. -## Installation +## Building the library ### using conan @@ -232,6 +232,23 @@ cmake .. cmake --build . -j ``` +## Consuming the library + +this library is uses cmake as a build system. +```cmake +# you can use cmake's `find_package` after installation or `add_subdirectory` when vendoring this repository + +find_package(cpp-jwt REQUIRED) +# or +add_subdirectory(third_party/cpp-jwt) + +add_executable(main main.cpp) +target_link_libraries(main cpp-jwt::cpp-jwt) +``` + +you can also use this library as a conan package, its available in the [conan center](https://conan.io/center/cpp-jwt/1.2/?user=_&channel=_): +just add `cpp-jwt[>=1.2]` to your conanfile.txt + ## Parameters There are two sets of parameters which can be used for creating `jwt_object` and for decoding. All the parameters are basically a function which returns an instance of a type which are modelled after ParameterConcept (see jwt::detail::meta::is_parameter_concept).