This commit is contained in:
nlohmann committed 2026-10-08 07:22:44 +00:00
1 parent 4e5f6962d3
commit 207a4df1e4
20 files changed
+356 -311

No files matched your search

+18 -4
View File
@@ -125,10 +125,24 @@ meson wrap install nlohmann_json
Please see the Meson project for any issues regarding the packaging.
The provided `meson.build` can also be used as an alternative to CMake for installing `nlohmann_json` system-wide in
which case a [pkg-config](pkg-config.md) file is installed. To use it, have your build system require the
`nlohmann_json` pkg-config dependency. In Meson, it is preferred to use the
[`dependency()`](https://mesonbuild.com/Reference-manual.html#dependency) object with a subproject fallback, rather than
using the subproject directly.
which case a [pkg-config](pkg-config.md) file and the CMake package config files are installed. To use it, have your build system require
the `nlohmann_json` pkg-config dependency, or use [`find_package(nlohmann_json)`](cmake.md#external) in CMake. In Meson,
it is preferred to use the [`dependency()`](https://mesonbuild.com/Reference-manual.html#dependency) object with a
subproject fallback, rather than using the subproject directly.
The options that change the library's configuration are available in Meson as well, named like the
[CMake options](cmake.md#cmake-options) without the `JSON_` prefix: `MultipleHeaders`, `GlobalUDLs`,
`ImplicitConversions`, `DisableEnumSerialization`, `DisableTupleReferenceConversion`, `Diagnostics`,
`Diagnostic_Positions`, `LegacyDiscardedValueComparison`, `StrictNulHandling`, `StrictBinaryUTF8`, and
`DeleteDeprecatedFunctions`. They have the same defaults as in CMake, except that
`MultipleHeaders` is `false`. Set them with `-D` when setting up the build, or with the subproject name as prefix when
the library is used as a subproject:
```shell
meson setup build -Dnlohmann_json:Diagnostics=true
```
The resulting compile definitions are part of the Meson dependency, the pkg-config file, and the CMake target.
??? example "Example: Wrap"
+3 -2
View File
@@ -59,7 +59,8 @@
</code></pre></div> </li> <li> <p>Compile the code and pass the Homebrew prefix to CMake to find installed packages via <code class=highlight><span class=err>find_package</span></code>:</p> <div class=highlight><pre><span></span><code><span class=nv>CMAKE_PREFIX_PATH</span><span class=o>=</span><span class=k>$(</span>brew<span class=w> </span>--prefix<span class=k>)</span><span class=w> </span>cmake<span class=w> </span>-S<span class=w> </span>.<span class=w> </span>-B<span class=w> </span>build
cmake<span class=w> </span>--build<span class=w> </span>build
</code></pre></div> </li> </ol> </details> <h2 id=meson>Meson<a class=headerlink href=#meson title="Permanent link">&para;</a></h2> <div class="admonition abstract"> <p class=admonition-title>Summary</p> <p>wrap: <strong><code>nlohmann_json</code></strong></p> <ul> <li><span class=twemoji><svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M7.75 6.5a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5"/><path d="M2.5 1h8.44a1.5 1.5 0 0 1 1.06.44l10.25 10.25a1.5 1.5 0 0 1 0 2.12l-8.44 8.44a1.5 1.5 0 0 1-2.12 0L1.44 12A1.5 1.5 0 0 1 1 10.94V2.5A1.5 1.5 0 0 1 2.5 1m0 1.5v8.44l10.25 10.25 8.44-8.44L10.94 2.5Z"/></svg></span> Available versions: current version and select older versions (see <a href="https://mesonbuild.com/Wrapdb-projects.html">WrapDB</a>)</li> <li><span class=twemoji><svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20.322.75h1.176a1.75 1.75 0 0 1 1.75 1.749v1.177a10.75 10.75 0 0 1-2.925 7.374l-1.228 1.304a24 24 0 0 1-1.596 1.542v5.038c0 .615-.323 1.184-.85 1.5l-4.514 2.709a.75.75 0 0 1-1.12-.488l-.963-4.572a1.3 1.3 0 0 1-.14-.129L8.04 15.96l-1.994-1.873a1.3 1.3 0 0 1-.129-.14l-4.571-.963a.75.75 0 0 1-.49-1.12l2.71-4.514c.316-.527.885-.85 1.5-.85h5.037a24 24 0 0 1 1.542-1.594l1.304-1.23A10.75 10.75 0 0 1 20.321.75Zm-6.344 4.018v-.001l-1.304 1.23a22.3 22.3 0 0 0-3.255 3.851l-2.193 3.29 1.859 1.744.034.034 1.743 1.858 3.288-2.192a22.3 22.3 0 0 0 3.854-3.257l1.228-1.303a9.25 9.25 0 0 0 2.517-6.346V2.5a.25.25 0 0 0-.25-.25h-1.177a9.25 9.25 0 0 0-6.344 2.518M6.5 21c-1.209 1.209-3.901 1.445-4.743 1.49a.24.24 0 0 1-.18-.067.24.24 0 0 1-.067-.18c.045-.842.281-3.534 1.49-4.743.9-.9 2.6-.9 3.5 0s.9 2.6 0 3.5m-.592-8.588L8.17 9.017q.346-.519.717-1.017H5.066a.25.25 0 0 0-.214.121l-2.167 3.612ZM16 15.112q-.5.372-1.018.718l-3.393 2.262.678 3.223 3.612-2.167a.25.25 0 0 0 .121-.214ZM17.5 8a1.5 1.5 0 1 1-3.001-.001A1.5 1.5 0 0 1 17.5 8"/></svg></span> The package is updated automatically from file <a href="https://github.com/nlohmann/json/blob/develop/meson.build"><code>meson.build</code></a>.</li> <li><span class=twemoji><svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M3 3a2 2 0 0 1 2-2h9.982a2 2 0 0 1 1.414.586l4.018 4.018A2 2 0 0 1 21 7.018V21a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v18a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5V8.5h-4a2 2 0 0 1-2-2v-4Zm10 0v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0-.146-.336l-4.018-4.018A.5.5 0 0 0 15 2.5"/></svg></span> File issues at the <a href="https://github.com/nlohmann/json/issues">library issue tracker</a></li> <li><span class=twemoji><svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M10.97 8.265a1.45 1.45 0 0 0-.487.57.75.75 0 0 1-1.341-.67c.2-.402.513-.826.997-1.148C10.627 6.69 11.244 6.5 12 6.5c.658 0 1.369.195 1.934.619a2.45 2.45 0 0 1 1.004 2.006c0 1.033-.513 1.72-1.027 2.215-.19.183-.399.358-.579.508l-.147.123a4 4 0 0 0-.435.409v1.37a.75.75 0 1 1-1.5 0v-1.473c0-.237.067-.504.247-.736.22-.28.486-.517.718-.714l.183-.153.001-.001c.172-.143.324-.27.47-.412.368-.355.569-.676.569-1.136a.95.95 0 0 0-.404-.806C12.766 8.118 12.384 8 12 8c-.494 0-.814.121-1.03.265M13 17a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/><path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1M2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12"/></svg></span> <a href="https://mesonbuild.com/index.html">Meson website</a></li> </ul> </div> <p>If you are using the <a href="http://mesonbuild.com">Meson Build System</a>, add this source tree as a <a href="https://mesonbuild.com/Subprojects.html#using-a-subproject">meson subproject</a>. You may also use the <code>include.zip</code> published in this project's <a href="https://github.com/nlohmann/json/releases">Releases</a> to reduce the size of the vendored source tree. Alternatively, you can get a wrap file by downloading it from <a href="https://mesonbuild.com/Wrapdb-projects.html">Meson WrapDB</a>, or use</p> <div class=highlight><pre><span></span><code>meson<span class=w> </span>wrap<span class=w> </span>install<span class=w> </span>nlohmann_json
</code></pre></div> <p>Please see the Meson project for any issues regarding the packaging.</p> <p>The provided <code>meson.build</code> can also be used as an alternative to CMake for installing <code>nlohmann_json</code> system-wide in which case a <a href=../pkg-config/ >pkg-config</a> file is installed. To use it, have your build system require the <code>nlohmann_json</code> pkg-config dependency. In Meson, it is preferred to use the <a href="https://mesonbuild.com/Reference-manual.html#dependency"><code>dependency()</code></a> object with a subproject fallback, rather than using the subproject directly.</p> <details class=example> <summary>Example: Wrap</summary> <ol> <li> <p>Create the following files:</p> <div class=highlight><span class=filename>meson.build</span><pre><span></span><code><span class=na>project('json_example', 'cpp',</span>
</code></pre></div> <p>Please see the Meson project for any issues regarding the packaging.</p> <p>The provided <code>meson.build</code> can also be used as an alternative to CMake for installing <code>nlohmann_json</code> system-wide in which case a <a href=../pkg-config/ >pkg-config</a> file and the CMake package config files are installed. To use it, have your build system require the <code>nlohmann_json</code> pkg-config dependency, or use <a href=../cmake/#external><code>find_package(nlohmann_json)</code></a> in CMake. In Meson, it is preferred to use the <a href="https://mesonbuild.com/Reference-manual.html#dependency"><code>dependency()</code></a> object with a subproject fallback, rather than using the subproject directly.</p> <p>The options that change the library's configuration are available in Meson as well, named like the <a href=../cmake/#cmake-options>CMake options</a> without the <code>JSON_</code> prefix: <code>MultipleHeaders</code>, <code>GlobalUDLs</code>, <code>ImplicitConversions</code>, <code>DisableEnumSerialization</code>, <code>DisableTupleReferenceConversion</code>, <code>Diagnostics</code>, <code>Diagnostic_Positions</code>, <code>LegacyDiscardedValueComparison</code>, <code>StrictNulHandling</code>, <code>StrictBinaryUTF8</code>, and <code>DeleteDeprecatedFunctions</code>. They have the same defaults as in CMake, except that <code>MultipleHeaders</code> is <code>false</code>. Set them with <code>-D</code> when setting up the build, or with the subproject name as prefix when the library is used as a subproject:</p> <div class=highlight><pre><span></span><code>meson<span class=w> </span>setup<span class=w> </span>build<span class=w> </span>-Dnlohmann_json:Diagnostics<span class=o>=</span><span class=nb>true</span>
</code></pre></div> <p>The resulting compile definitions are part of the Meson dependency, the pkg-config file, and the CMake target.</p> <details class=example> <summary>Example: Wrap</summary> <ol> <li> <p>Create the following files:</p> <div class=highlight><span class=filename>meson.build</span><pre><span></span><code><span class=na>project('json_example', 'cpp',</span>
<span class=w> </span><span class=na>version</span><span class=o>:</span><span class=w> </span><span class=s>'1.0'</span><span class=na>,</span>
<span class=w> </span><span class=na>default_options</span><span class=o>:</span><span class=w> </span><span class=s>['cpp_std=c++11']</span>
<span class=na>)</span>
@@ -451,4 +452,4 @@ cmake<span class=w> </span>--build<span class=w> </span>build
<span class=w> </span><span class=nf>set_languages</span><span class=p>(</span><span class=s2>"cxx11"</span><span class=p>)</span>
</code></pre></div> </li> <li> <p>Build</p> <div class=highlight><pre><span></span><code>xmake
</code></pre></div> </li> <li> <p>Run</p> <div class=highlight><pre><span></span><code>xmake<span class=w> </span>run
</code></pre></div> </li> </ol> </details> <hr> <h2 id=other-package-managers>Other package managers<a class=headerlink href=#other-package-managers title="Permanent link">&para;</a></h2> <p>The library is also contained in many other package repositories; <a href="https://repology.org/project/nlohmann-json/versions">Repology</a> tracks the packaged versions across repositories.</p> <hr> <h2 id=buckaroo>Buckaroo<a class=headerlink href=#buckaroo title="Permanent link">&para;</a></h2> <p>If you are using <a href="https://github.com/LoopPerfect/buckaroo">Buckaroo</a>, you can install this library's module with <code>buckaroo add github.com/buckaroo-pm/nlohmann-json</code>. There is a demo repo <a href="https://github.com/njlr/buckaroo-nholmann-json-example">here</a>.</p> <div class="admonition warning"> <p class=admonition-title>Warning</p> <p>The module is outdated as the respective <a href="https://github.com/buckaroo-pm/nlohmann-json">repository</a> has not been updated in years.</p> </div> <h2 id=cocoapods>CocoaPods<a class=headerlink href=#cocoapods title="Permanent link">&para;</a></h2> <p>If you are using <a href="https://cocoapods.org">CocoaPods</a>, you can use the library by adding pod <code>"nlohmann_json", '~&gt;3.1.2'</code> to your podfile (see <a href="https://bitbucket.org/benman/nlohmann_json-cocoapod/src/master/">an example</a>). Please file issues at <a href="https://bitbucket.org/benman/nlohmann_json-cocoapod/src/master/">the repository</a>, as its issue tracker is no longer reachable.</p> <p><a href="https://cocoapods.org/pods/nlohmann_json"><img alt="CocoaPods package" src="../../assets/external/img.shields.io/cocoapods/v/nlohmann_json.svg"></a></p> <div class="admonition warning"> <p class=admonition-title>Warning</p> <p>The module is outdated as the respective <a href="https://cocoapods.org/pods/nlohmann_json">pod</a> has not been updated in years.</p> </div> <h2 id=npm>npm<a class=headerlink href=#npm title="Permanent link">&para;</a></h2> <p>This project does not publish an official <a href="https://www.npmjs.com">npm</a> package. The npm package <a href="https://www.npmjs.com/package/nlohmann-json"><code>nlohmann-json</code></a> (or similarly named packages) is not maintained or endorsed by this project. Use one of the package managers listed above, or integrate the single header directly.</p> <h2 id=esp-idf-and-platformio>ESP-IDF and PlatformIO<a class=headerlink href=#esp-idf-and-platformio title="Permanent link">&para;</a></h2> <p>There is no official package published to the <a href="https://components.espressif.com">ESP-IDF Component Registry</a> or the <a href="https://registry.platformio.org">PlatformIO Registry</a>. A community-maintained fork, <a href="https://github.com/Johboh/nlohmann-json">Johboh/nlohmann-json</a>, publishes this library to both registries on each new release and can be used as an unofficial component/package for ESP-IDF and PlatformIO projects. As the library is header-only, it can otherwise be used directly by adding its <code>include/</code> directory to your component's/project's include paths, like any other integration method described on this page.</p> <!-- https://squidfunk.github.io/mkdocs-material/reference/tooltips/#adding-a-glossary --> <aside class=md-source-file> <span class=md-source-file__fact> <span class=md-icon title="Last update"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg> </span> <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="October 2, 2026 09:32:15 UTC">October 2, 2026</span> </span> </aside> </article> </div> <script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type=button class="md-top md-icon" data-md-component=top hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class=md-footer> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-copyright> <div class=md-copyright__highlight> Copyright &copy; 2013-2026 Niels Lohmann </div> </div> <div class=md-social> <a href="https://github.com/nlohmann" target="_blaLine truncated
</code></pre></div> </li> </ol> </details> <hr> <h2 id=other-package-managers>Other package managers<a class=headerlink href=#other-package-managers title="Permanent link">&para;</a></h2> <p>The library is also contained in many other package repositories; <a href="https://repology.org/project/nlohmann-json/versions">Repology</a> tracks the packaged versions across repositories.</p> <hr> <h2 id=buckaroo>Buckaroo<a class=headerlink href=#buckaroo title="Permanent link">&para;</a></h2> <p>If you are using <a href="https://github.com/LoopPerfect/buckaroo">Buckaroo</a>, you can install this library's module with <code>buckaroo add github.com/buckaroo-pm/nlohmann-json</code>. There is a demo repo <a href="https://github.com/njlr/buckaroo-nholmann-json-example">here</a>.</p> <div class="admonition warning"> <p class=admonition-title>Warning</p> <p>The module is outdated as the respective <a href="https://github.com/buckaroo-pm/nlohmann-json">repository</a> has not been updated in years.</p> </div> <h2 id=cocoapods>CocoaPods<a class=headerlink href=#cocoapods title="Permanent link">&para;</a></h2> <p>If you are using <a href="https://cocoapods.org">CocoaPods</a>, you can use the library by adding pod <code>"nlohmann_json", '~&gt;3.1.2'</code> to your podfile (see <a href="https://bitbucket.org/benman/nlohmann_json-cocoapod/src/master/">an example</a>). Please file issues at <a href="https://bitbucket.org/benman/nlohmann_json-cocoapod/src/master/">the repository</a>, as its issue tracker is no longer reachable.</p> <p><a href="https://cocoapods.org/pods/nlohmann_json"><img alt="CocoaPods package" src="../../assets/external/img.shields.io/cocoapods/v/nlohmann_json.svg"></a></p> <div class="admonition warning"> <p class=admonition-title>Warning</p> <p>The module is outdated as the respective <a href="https://cocoapods.org/pods/nlohmann_json">pod</a> has not been updated in years.</p> </div> <h2 id=npm>npm<a class=headerlink href=#npm title="Permanent link">&para;</a></h2> <p>This project does not publish an official <a href="https://www.npmjs.com">npm</a> package. The npm package <a href="https://www.npmjs.com/package/nlohmann-json"><code>nlohmann-json</code></a> (or similarly named packages) is not maintained or endorsed by this project. Use one of the package managers listed above, or integrate the single header directly.</p> <h2 id=esp-idf-and-platformio>ESP-IDF and PlatformIO<a class=headerlink href=#esp-idf-and-platformio title="Permanent link">&para;</a></h2> <p>There is no official package published to the <a href="https://components.espressif.com">ESP-IDF Component Registry</a> or the <a href="https://registry.platformio.org">PlatformIO Registry</a>. A community-maintained fork, <a href="https://github.com/Johboh/nlohmann-json">Johboh/nlohmann-json</a>, publishes this library to both registries on each new release and can be used as an unofficial component/package for ESP-IDF and PlatformIO projects. As the library is header-only, it can otherwise be used directly by adding its <code>include/</code> directory to your component's/project's include paths, like any other integration method described on this page.</p> <!-- https://squidfunk.github.io/mkdocs-material/reference/tooltips/#adding-a-glossary --> <aside class=md-source-file> <span class=md-source-file__fact> <span class=md-icon title="Last update"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg> </span> <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="October 7, 2026 20:20:05 UTC">October 7, 2026</span> </span> </aside> </article> </div> <script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type=button class="md-top md-icon" data-md-component=top hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class=md-footer> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-copyright> <div class=md-copyright__highlight> Copyright &copy; 2013-2026 Niels Lohmann </div> </div> <div class=md-social> <a href="https://github.com/nlohmann" target="_blaLine truncated
+9 -1
View File
@@ -161,7 +161,15 @@ meson wrap install nlohmann_json
Please see the Meson project for any issues regarding the packaging.
The provided `meson.build` can also be used as an alternative to CMake for installing `nlohmann_json` system-wide in which case a [pkg-config](https://json.nlohmann.me/integration/pkg-config/index.md) file is installed. To use it, have your build system require the `nlohmann_json` pkg-config dependency. In Meson, it is preferred to use the [`dependency()`](https://mesonbuild.com/Reference-manual.html#dependency) object with a subproject fallback, rather than using the subproject directly.
The provided `meson.build` can also be used as an alternative to CMake for installing `nlohmann_json` system-wide in which case a [pkg-config](https://json.nlohmann.me/integration/pkg-config/index.md) file and the CMake package config files are installed. To use it, have your build system require the `nlohmann_json` pkg-config dependency, or use [`find_package(nlohmann_json)`](https://json.nlohmann.me/integration/cmake/#external) in CMake. In Meson, it is preferred to use the [`dependency()`](https://mesonbuild.com/Reference-manual.html#dependency) object with a subproject fallback, rather than using the subproject directly.
The options that change the library's configuration are available in Meson as well, named like the [CMake options](https://json.nlohmann.me/integration/cmake/#cmake-options) without the `JSON_` prefix: `MultipleHeaders`, `GlobalUDLs`, `ImplicitConversions`, `DisableEnumSerialization`, `DisableTupleReferenceConversion`, `Diagnostics`, `Diagnostic_Positions`, `LegacyDiscardedValueComparison`, `StrictNulHandling`, `StrictBinaryUTF8`, and `DeleteDeprecatedFunctions`. They have the same defaults as in CMake, except that `MultipleHeaders` is `false`. Set them with `-D` when setting up the build, or with the subproject name as prefix when the library is used as a subproject:
```
meson setup build -Dnlohmann_json:Diagnostics=true
```
The resulting compile definitions are part of the Meson dependency, the pkg-config file, and the CMake target.
Example: Wrap