Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 543c288

Browse files
Add meson documentation (DaveGamble#761)
1 parent 766dd9d commit 543c288

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Ultralightweight JSON parser in ANSI C.
1010
* [Copying the source](#copying-the-source)
1111
* [CMake](#cmake)
1212
* [Makefile](#makefile)
13+
* [Meson](#meson)
1314
* [Vcpkg](#Vcpkg)
1415
* [Including cJSON](#including-cjson)
1516
* [Data Structure](#data-structure)
@@ -145,6 +146,23 @@ make all
145146

146147
If you want, you can install the compiled library to your system using `make install`. By default it will install the headers in `/usr/local/include/cjson` and the libraries in `/usr/local/lib`. But you can change this behavior by setting the `PREFIX` and `DESTDIR` variables: `make PREFIX=/usr DESTDIR=temp install`. And uninstall them with: `make PREFIX=/usr DESTDIR=temp uninstall`.
147148

149+
#### Meson
150+
151+
To make cjson work in a project using meson, the libcjson dependency has to be included:
152+
153+
```meson
154+
project('c-json-example', 'c')
155+
156+
cjson = dependency('libcjson')
157+
158+
example = executable(
159+
'example',
160+
'example.c',
161+
dependencies: [cjson],
162+
)
163+
```
164+
165+
148166
#### Vcpkg
149167

150168
You can download and install cJSON using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /