README: add explanation on how to use pkg-config.
This commit is contained in:
parent
c7d18c1625
commit
251fce819c
1 changed files with 15 additions and 0 deletions
15
README.md
15
README.md
|
@ -27,6 +27,7 @@
|
||||||
- [Integration](#integration)
|
- [Integration](#integration)
|
||||||
- [CMake](#cmake)
|
- [CMake](#cmake)
|
||||||
- [Package Managers](#package-managers)
|
- [Package Managers](#package-managers)
|
||||||
|
- [Pkg-config](#pkg-config)
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
- [JSON as first-class data type](#json-as-first-class-data-type)
|
- [JSON as first-class data type](#json-as-first-class-data-type)
|
||||||
- [Serialization / Deserialization](#serialization--deserialization)
|
- [Serialization / Deserialization](#serialization--deserialization)
|
||||||
|
@ -230,6 +231,20 @@ Please file issues [here](https://github.com/build2-packaging/nlohmann-json) if
|
||||||
|
|
||||||
If you are using [`wsjcpp`](https://wsjcpp.org), you can use the command `wsjcpp install "https://github.com/nlohmann/json:develop"` to get the latest version. Note you can change the branch ":develop" to an existing tag or another branch.
|
If you are using [`wsjcpp`](https://wsjcpp.org), you can use the command `wsjcpp install "https://github.com/nlohmann/json:develop"` to get the latest version. Note you can change the branch ":develop" to an existing tag or another branch.
|
||||||
|
|
||||||
|
### Pkg-config
|
||||||
|
|
||||||
|
If you are using bare Makefiles, you can use `pkg-config` to generate the include flags that point to where the library is installed:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pkg-config nlohmann_json --cflags
|
||||||
|
```
|
||||||
|
|
||||||
|
Users of the Meson build system will also be able to use a system wide library, which will be found by `pkg-config`:
|
||||||
|
|
||||||
|
```meson
|
||||||
|
json = dependency('nlohmann_json', required: true)
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
Beside the examples below, you may want to check the [documentation](https://nlohmann.github.io/json/) where each function contains a separate code example (e.g., check out [`emplace()`](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a5338e282d1d02bed389d852dd670d98d.html#a5338e282d1d02bed389d852dd670d98d)). All [example files](https://github.com/nlohmann/json/tree/develop/doc/examples) can be compiled and executed on their own (e.g., file [emplace.cpp](https://github.com/nlohmann/json/blob/develop/doc/examples/emplace.cpp)).
|
Beside the examples below, you may want to check the [documentation](https://nlohmann.github.io/json/) where each function contains a separate code example (e.g., check out [`emplace()`](https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a5338e282d1d02bed389d852dd670d98d.html#a5338e282d1d02bed389d852dd670d98d)). All [example files](https://github.com/nlohmann/json/tree/develop/doc/examples) can be compiled and executed on their own (e.g., file [emplace.cpp](https://github.com/nlohmann/json/blob/develop/doc/examples/emplace.cpp)).
|
||||||
|
|
Loading…
Reference in a new issue